cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AnimationState.h File Reference

Classes

struct  spTrackEntry
 
struct  spAnimationState
 

Typedefs

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

Enumerations

enum  spEventType { SP_ANIMATION_START, SP_ANIMATION_END, SP_ANIMATION_COMPLETE, SP_ANIMATION_EVENT }
 

Functions

spAnimationStatespAnimationState_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)
 
spTrackEntryspAnimationState_setAnimationByName (spAnimationState *self, int trackIndex, const char *animationName, intloop)
 Set the current animation. More...
 
spTrackEntryspAnimationState_setAnimation (spAnimationState *self, int trackIndex, spAnimation *animation, intloop)
 
spTrackEntryspAnimationState_addAnimationByName (spAnimationState *self, int trackIndex, const char *animationName, intloop, float delay)
 Adds an animation to be played delay seconds after the current or last queued animation, taking into account any mix duration. More...
 
spTrackEntryspAnimationState_addAnimation (spAnimationState *self, int trackIndex, spAnimation *animation, intloop, float delay)
 
spTrackEntryspAnimationState_getCurrent (spAnimationState *self, int trackIndex)
 

Typedef Documentation

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

Enumeration Type Documentation

Enumerator
SP_ANIMATION_START 
SP_ANIMATION_END 
SP_ANIMATION_COMPLETE 
SP_ANIMATION_EVENT 

Function Documentation

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 
)

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   
)

Set the current animation.

Any queued animations are cleared.

void spAnimationState_update ( spAnimationState self,
float  delta 
)