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

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

| 类型定义 | 枚举 | 函数

AnimationState.h 文件参考

#include

#include

#include

##
struct spTrackEntry
struct spAnimationState
## 类型定义
typedef void( spAnimationStateListener )(spAnimationState state, int trackIndex, spEventType type, spEvent *event, int loopCount)
## 枚举
enum spEventType { ANIMATION_START, ANIMATION_END, ANIMATION_COMPLETE, ANIMATION_EVENT }
## 函数
spAnimationState spAnimationState_create (spAnimationStateData data)
void spAnimationState_dispose (spAnimationState self)
void spAnimationState_update (spAnimationState self, float delta)
void spAnimationState_apply (spAnimationState self, struct spSkeleton skeleton)
void spAnimationState_clearTracks (spAnimationState self)
void spAnimationState_clearTrack (spAnimationState self, int trackIndex)
spTrackEntry spAnimationState_setAnimationByName (spAnimationState self, int trackIndex, const char animationName, intloop)
设置当前动画. 更多…
spTrackEntry spAnimationState_setAnimation (spAnimationState self, int trackIndex, spAnimation animation, intloop)
spTrackEntry spAnimationState_addAnimationByName (spAnimationState self, int trackIndex, const char animationName, intloop, float delay)
添加动画,动画会在当前的动画或动画队列中最后的动画结束delay时间后进行播放, delay为混合效果的时间按 Adds an animation to be played delay seconds after the current or last queued animation, taking into account any mix duration. 更多…
spTrackEntry spAnimationState_addAnimation (spAnimationState self, int trackIndex, spAnimation animation, intloop, float delay)
spTrackEntry spAnimationState_getCurrent (spAnimationState self, int trackIndex)

类型定义说明

typedef void( spAnimationStateListener)(spAnimationState state, int trackIndex, spEventType type, spEvent *event, int loopCount)

枚举类型说明

enum spEventType
枚举值
ANIMATION_START
ANIMATION_END
ANIMATION_COMPLETE
ANIMATION_EVENT

函数说明

spTrackEntry spAnimationState_addAnimation ( spAnimationState self,
int trackIndex,
spAnimation * animation,
intloop ,
float delay
)

spTrackEntry spAnimationState_addAnimationByName ( spAnimationState self,
int trackIndex,
const char * animationName,
intloop ,
float delay
)

添加动画,动画会在当前的动画或动画队列中最后的动画结束delay时间后进行播放, delay为混合效果的时间按 Adds an animation to be played delay seconds after the current or last queued animation, taking into account any mix duration.

void spAnimationState_apply ( spAnimationState self,
struct spSkeleton skeleton
)

void spAnimationState_clearTrack ( spAnimationState * self,
int trackIndex
)

void spAnimationState_clearTracks ( spAnimationState * self)

spAnimationState spAnimationState_create ( spAnimationStateData data)

void spAnimationState_dispose ( spAnimationState * self)

spTrackEntry spAnimationState_getCurrent ( spAnimationState self,
int trackIndex
)

spTrackEntry spAnimationState_setAnimation ( spAnimationState self,
int trackIndex,
spAnimation * animation,
intloop
)

spTrackEntry spAnimationState_setAnimationByName ( spAnimationState self,
int trackIndex,
const char * animationName,
intloop
)

设置当前动画.

队列中的动画会被清除.

void spAnimationState_update ( spAnimationState * self,
float delta
)