cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
类 - 图1 类 - 图2)
- 文件列表 - 文件成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

| 类型定义 | 枚举 | 函数

Animation.h 文件参考

#include

##
struct spAnimation
struct spTimeline
struct spCurveTimeline
struct spRotateTimeline
struct spColorTimeline
struct spAttachmentTimeline
struct spEventTimeline
struct spDrawOrderTimeline
## 类型定义
typedef struct spBaseTimeline spTranslateTimeline
typedef struct spBaseTimeline spScaleTimeline
## 枚举
enum spTimelineType { TIMELINE_SCALE, TIMELINE_ROTATE, TIMELINE_TRANLATE, TIMELINE_COLOR, TIMELINE_ATTACHMENT, TIMELINE_EVENT, TIMELINE_DRAWORDER }
## 函数
spAnimation spAnimation_create (const char name, int timelineCount)
void spAnimation_dispose (spAnimation self)
void spAnimation_apply (const spAnimation self, struct spSkeleton skeleton, float lastTime, float time, int loop, spEvent **events, int eventCount)
指定动画的时间摆放骨骼位置(姿势) 更多…
void spAnimation_mix (const spAnimation self, struct spSkeleton skeleton, float lastTime, float time, int loop, spEvent events, int eventCount, float alpha)
指定动画的时间摆放骨骼位置(姿势)和当前的姿势有混合效果 更多…
void spTimeline_dispose (spTimeline self)
void spTimeline_apply (const spTimeline self, struct spSkeleton skeleton, float lastTime, float time, spEvent firedEvents, int eventCount, float alpha)
void spCurveTimeline_setLinear (spCurveTimeline self, int frameIndex)
void spCurveTimeline_setStepped (spCurveTimeline self, int frameIndex)
void spCurveTimeline_setCurve (spCurveTimeline self, int frameIndex, float cx1, float cy1, float cx2, float cy2)
float spCurveTimeline_getCurvePercent (const spCurveTimeline self, int frameIndex, float percent)
spRotateTimeline spRotateTimeline_create (int frameCount)
void spRotateTimeline_setFrame (spRotateTimeline self, int frameIndex, float time, float angle)
spTranslateTimeline spTranslateTimeline_create (int frameCount)
void spTranslateTimeline_setFrame (spTranslateTimeline self, int frameIndex, float time, float x, float y)
spScaleTimeline spScaleTimeline_create (int frameCount)
void spScaleTimeline_setFrame (spScaleTimeline self, int frameIndex, float time, float x, float y)
spColorTimeline spColorTimeline_create (int frameCount)
void spColorTimeline_setFrame (spColorTimeline self, int frameIndex, float time, float r, float g, float b, float a)
spAttachmentTimeline spAttachmentTimeline_create (int frameCount)
void spAttachmentTimeline_setFrame (spAttachmentTimeline self, int frameIndex, float time, const char attachmentName)
spEventTimeline spEventTimeline_create (int frameCount)
void spEventTimeline_setFrame (spEventTimeline self, int frameIndex, float time, spEvent event)
spDrawOrderTimeline spDrawOrderTimeline_create (int frameCount, int slotCount)
void spDrawOrderTimeline_setFrame (spDrawOrderTimeline self, int frameIndex, float time, const int drawOrder)

类型定义说明

typedef struct spBaseTimeline spScaleTimeline

typedef struct spBaseTimeline spTranslateTimeline

枚举类型说明

enum spTimelineType
枚举值
TIMELINE_SCALE
TIMELINE_ROTATE
TIMELINE_TRANLATE
TIMELINE_COLOR
TIMELINE_ATTACHMENT
TIMELINE_EVENT
TIMELINE_DRAWORDER

函数说明

void spAnimation_apply ( const spAnimation self,
struct spSkeleton skeleton,
float lastTime,
float time,
int loop,
spEvent * events,
int eventCount
)

指定动画的时间摆放骨骼位置(姿势)

  • 参数
  • lastTime动画持续的时间. events动画更新过程中触发的时间会添加到events数组里.

spAnimation spAnimation_create ( const char name,
int timelineCount
)

void spAnimation_dispose ( spAnimation * self)

void spAnimation_mix ( const spAnimation self,
struct spSkeleton skeleton,
float lastTime,
float time,
int loop,
spEvent * events,
int eventCount,
float alpha
)

指定动画的时间摆放骨骼位置(姿势)和当前的姿势有混合效果

  • 参数
  • lastTime动画持续的时间. events动画更新过程中触发的时间会添加到events数组里. alpha动画对当前骨骼姿势的影响量alpha.

spAttachmentTimeline* spAttachmentTimeline_create ( int frameCount)

void spAttachmentTimeline_setFrame ( spAttachmentTimeline self,
int frameIndex,
float time,
const char attachmentName
)

spColorTimeline* spColorTimeline_create ( int frameCount)

void spColorTimeline_setFrame ( spColorTimeline * self,
int frameIndex,
float time,
float r,
float g,
float b,
float a
)

float spCurveTimeline_getCurvePercent ( const spCurveTimeline * self,
int frameIndex,
float percent
)

void spCurveTimeline_setCurve ( spCurveTimeline * self,
int frameIndex,
float cx1,
float cy1,
float cx2,
float cy2
)

void spCurveTimeline_setLinear ( spCurveTimeline * self,
int frameIndex
)

void spCurveTimeline_setStepped ( spCurveTimeline * self,
int frameIndex
)

spDrawOrderTimeline* spDrawOrderTimeline_create ( int frameCount,
int slotCount
)

void spDrawOrderTimeline_setFrame ( spDrawOrderTimeline self,
int frameIndex,
float time,
const int drawOrder
)

spEventTimeline* spEventTimeline_create ( int frameCount)

void spEventTimeline_setFrame ( spEventTimeline self,
int frameIndex,
float time,
spEvent event
)

spRotateTimeline* spRotateTimeline_create ( int frameCount)

void spRotateTimeline_setFrame ( spRotateTimeline * self,
int frameIndex,
float time,
float angle
)

spScaleTimeline* spScaleTimeline_create ( int frameCount)

void spScaleTimeline_setFrame ( spScaleTimeline * self,
int frameIndex,
float time,
float x,
float y
)

void spTimeline_apply ( const spTimeline self,
struct spSkeleton skeleton,
float lastTime,
float time,
spEvent * firedEvents,
int eventCount,
float alpha
)

void spTimeline_dispose ( spTimeline * self)

spTranslateTimeline* spTranslateTimeline_create ( int frameCount)

void spTranslateTimeline_setFrame ( spTranslateTimeline * self,
int frameIndex,
float time,
float x,
float y
)