#include <CCArmatureAnimation.h>
Public Member Functions | |
| CCArmatureAnimation () | |
| virtual | ~CCArmatureAnimation (void) |
| virtual bool | init (CCArmature *armature) |
| Init with a CCArmature. More... | |
| virtual CC_DEPRECATED_ATTRIBUTE void | setAnimationScale (float animationScale) |
| Scale animation play speed. More... | |
| virtual CC_DEPRECATED_ATTRIBUTE float | getAnimationScale () const |
| virtual void | setSpeedScale (float speedScale) |
| Scale animation play speed. More... | |
| virtual float | getSpeedScale () const |
| virtual CC_DEPRECATED_ATTRIBUTE void | setAnimationInternal (float animationInternal) |
| The animation update speed. More... | |
| virtual void | play (const char *animationName, int durationTo=-1, int durationTween=-1, int loop=-1, int tweenEasing=TWEEN_EASING_MAX) |
| Play animation by animation name. More... | |
| virtual CC_DEPRECATED_ATTRIBUTE void | playByIndex (int animationIndex, int durationTo=-1, int durationTween=-1, int loop=-1, int tweenEasing=TWEEN_EASING_MAX) |
| Play animation by index, the other param is the same to play. More... | |
| virtual void | playWithIndex (int animationIndex, int durationTo=-1, int durationTween=-1, int loop=-1, int tweenEasing=TWEEN_EASING_MAX) |
| virtual void | playWithNames (const std::vector< std::string > &movementNames, int durationTo=-1, bool loop=true) |
| Play several animation by names. More... | |
| virtual void | playWithIndexes (const std::vector< int > &movementIndexes, int durationTo=-1, bool loop=true) |
| Play several animation by indexes. More... | |
| virtual void | playWithArray (cocos2d::CCArray *movementNames, int durationTo=-1, bool loop=true) |
| virtual void | playWithIndexArray (cocos2d::CCArray *movementIndexes, int durationTo=-1, bool loop=true) |
| virtual void | gotoAndPlay (int frameIndex) |
| Go to specified frame and play current movement. More... | |
| virtual void | gotoAndPause (int frameIndex) |
| Go to specified frame and pause current movement. More... | |
| virtual void | pause () |
| Pause the Process. More... | |
| virtual void | resume () |
| Resume the Process. More... | |
| virtual void | stop () |
| Stop the Process. More... | |
| int | getMovementCount () |
| Get movement count. More... | |
| void | update (float dt) |
| You should never call this function, unless you know what you do Update the Process, include current process, current frame and son on. More... | |
| std::string | getCurrentMovementID () |
| Get current movementID. More... | |
| void | setMovementEventCallFunc (CCObject *target, SEL_MovementEventCallFunc callFunc) |
| Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(NULL, NULL);. More... | |
| void | setFrameEventCallFunc (CCObject *target, SEL_FrameEventCallFunc callFunc) |
| Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(NULL, NULL);. More... | |
| virtual CCObject * | getUserObject () |
| Returns a user assigned CCObject. More... | |
| virtual void | setUserObject (CCObject *pUserObject) |
| Returns a user assigned CCObject. More... | |
| virtual CCAnimationData * | getAnimationData (void) |
| getAnimationData More... | |
| virtual void | setAnimationData (CCAnimationData *var) |
| setAnimationData More... | |
Public Member Functions inherited from CCProcessBase | |
| CCProcessBase (void) | |
| ~CCProcessBase (void) | |
| virtual void | play (int durationTo, int durationTween, int loop, int tweenEasing) |
| Play animation by animation name. More... | |
| virtual int | getCurrentFrameIndex () |
Public Member Functions inherited from CCObject | |
| CCObject (void) | |
| virtual | ~CCObject (void) |
| void | release (void) |
| void | retain (void) |
| CCObject * | autorelease (void) |
| CCObject * | copy (void) |
| bool | isSingleReference (void) const |
| unsigned int | retainCount (void) const |
| virtual bool | isEqual (const CCObject *pObject) |
| virtual void | acceptVisitor (CCDataVisitor &visitor) |
Public Member Functions inherited from CCCopying | |
| virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
| static CCArmatureAnimation * | create (CCArmature *armature) |
| @ More... | |
Public Attributes | |
| float | m_fSpeedScale |
| Scale the animation speed. More... | |
| CCMovementData * | m_pMovementData |
| CCArmature * | m_pArmature |
| CCMovementData save all MovementFrameDatas this animation used. More... | |
| std::string | m_strMovementID |
| A weak reference of armature. More... | |
| int | m_iToIndex |
| Current movment's name. More... | |
| CCArray * | m_pTweenList |
| The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
| bool | m_bIgnoreFrameEvent |
| std::queue< CCFrameEvent * > | m_sFrameEventQueue |
| std::queue< CCMovementEvent * > | m_sMovementEventQueue |
| std::vector< std::string > | m_sMovementList |
| bool | m_bOnMovementList |
| bool | m_bMovementListLoop |
| unsigned int | m_uMovementIndex |
| int | m_iMovementListDurationTo |
| CCObject * | m_pUserObject |
Public Attributes inherited from CCProcessBase | |
| virtual float | getProcessScale (void)\n\n public |
| getProcessScale More... | |
| virtual bool | getIsPause (void)\n\n public |
| getIsPause More... | |
| virtual bool | getIsComplete (void)\n\n public |
| getIsComplete More... | |
| virtual bool | getIsPlaying (void)\n\n public |
| getIsPlaying More... | |
| virtual float | getCurrentPercent (void)\n\n public |
| getCurrentPercent More... | |
| virtual int | getRawDuration (void)\n\n public |
| getRawDuration More... | |
| virtual AnimationType | getLoopType (void)\n\n public |
| getLoopType More... | |
| virtual CCTweenType | getTweenEasing (void)\n\n public |
| getTweenEasing More... | |
Public Attributes inherited from CCObject | |
| unsigned int | m_uID |
| int | m_nLuaID |
Protected Member Functions | |
| void | updateHandler () |
| Update(float dt) will call this handler, you can handle your logic here. More... | |
| void | updateFrameData (float currentPercent) |
| Update current key frame, and process auto stop, pause. More... | |
| void | frameEvent (CCBone *bone, const char *frameEventName, int originFrameIndex, int currentFrameIndex) |
| Emit a frame event. More... | |
| void | movementEvent (CCArmature *armature, MovementEventType movementType, const char *movementID) |
| Emit a movement event. More... | |
| void | updateMovementList () |
| bool | isIgnoreFrameEvent () |
Protected Member Functions inherited from CCProcessBase | |
| virtual void | gotoFrame (int frameIndex) |
Protected Attributes | |
| CCAnimationData * | m_pAnimationData |
| CCAnimationData save all MovementDatas this animation used. More... | |
| SEL_MovementEventCallFunc | m_sMovementEventCallFunc |
| MovementEvent CallFunc. More... | |
| SEL_FrameEventCallFunc | m_sFrameEventCallFunc |
| FrameEvent CallFunc. More... | |
| CCObject * | m_sMovementEventTarget |
| CCObject * | m_sFrameEventTarget |
Protected Attributes inherited from CCProcessBase | |
| float | m_fProcessScale |
| Scale the process speed. More... | |
| bool | m_bIsPause |
| Set and get whether the aniamtion is pause. More... | |
| bool | m_bIsComplete |
| Set and get whether the aniamtion is complete. More... | |
| bool | m_bIsPlaying |
| Set and get whether the aniamtion is playing. More... | |
| float | m_fCurrentPercent |
| Current percent this process arrived. More... | |
| int | m_iRawDuration |
| The raw duration. More... | |
| AnimationType | m_eLoopType |
| The animation whether or not loop. More... | |
| CCTweenType | m_eTweenEasing |
| The tween easing effect. More... | |
| int | m_iDurationTween |
| The durantion frame count will run. More... | |
| float | m_fCurrentFrame |
| Current frame this process arrived, this frame is tween frame. More... | |
| int | m_iCurFrameIndex |
| Frame index it the time line. More... | |
| int | m_iNextFrameIndex |
| Next frame this process need run to. More... | |
| bool | m_bIsLoopBack |
| float | m_fAnimationInternal |
| The animation update speed. More... | |
Protected Attributes inherited from CCObject | |
| unsigned int | m_uReference |
| unsigned int | m_uAutoReleaseCount |
Friends | |
| class | CCTween |
|
virtual |
|
static |
@
|
protected |
Emit a frame event.
|
virtual |
getAnimationData
|
virtual |
| std::string getCurrentMovementID | ( | ) |
Get current movementID.
| int getMovementCount | ( | ) |
Get movement count.
|
virtual |
|
virtual |
|
virtual |
Go to specified frame and pause current movement.
|
virtual |
Go to specified frame and play current movement.
You need first switch to the movement you want to play, then call this function.
example : playByIndex(0); gotoAndPlay(0); playByIndex(1); gotoAndPlay(0); gotoAndPlay(15);
|
virtual |
Init with a CCArmature.
| armature | The CCArmature CCArmatureAnimation will bind to |
|
inlineprotected |
|
protected |
Emit a movement event.
|
virtual |
Pause the Process.
Reimplemented from CCProcessBase.
|
virtual |
Play animation by animation name.
| animationName | The animation name you want to play |
| durationTo | The frames between two animation changing-over. It's meaning is changing to this animation need how many frames |
-1 : use the value from CCMovementData get from flash design panel
| durationTween | The frame count you want to play in the game. if _durationTween is 80, then the animation will played 80 frames in a loop |
-1 : use the value from CCMovementData get from flash design panel
| loop | Whether the animation is loop loop < 0 : use the value from CCMovementData get from flash design panel
loop = 0 : this animation is not loop
loop > 0 : this animation is loop
|
| tweenEasing | CCTween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel
-1 : fade out
0 : line
1 : fade in
2 : fade in and out |
|
virtual |
Play animation by index, the other param is the same to play.
Deprecated, please use playWithIndex
| animationIndex | the animation index you want to play |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Play several animation by indexes.
|
virtual |
Play several animation by names.
|
virtual |
Resume the Process.
Reimplemented from CCProcessBase.
|
virtual |
setAnimationData
|
inlinevirtual |
The animation update speed.
|
virtual |
Scale animation play speed.
This method is deprecated, please use setSpeedScale.
| animationScale | Scale value |
| void setFrameEventCallFunc | ( | CCObject * | target, |
| SEL_FrameEventCallFunc | callFunc | ||
| ) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(NULL, NULL);.
| void setMovementEventCallFunc | ( | CCObject * | target, |
| SEL_MovementEventCallFunc | callFunc | ||
| ) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(NULL, NULL);.
|
virtual |
Scale animation play speed.
| animationScale | Scale value |
|
virtual |
|
virtual |
Stop the Process.
Reimplemented from CCProcessBase.
|
virtual |
You should never call this function, unless you know what you do Update the Process, include current process, current frame and son on.
| The | duration since last update |
Reimplemented from CCProcessBase.
|
protected |
Update current key frame, and process auto stop, pause.
|
protectedvirtual |
Update(float dt) will call this handler, you can handle your logic here.
Reimplemented from CCProcessBase.
|
protected |
|
friend |
| bool m_bIgnoreFrameEvent |
| bool m_bMovementListLoop |
| bool m_bOnMovementList |
| float m_fSpeedScale |
Scale the animation speed.
| int m_iMovementListDurationTo |
| int m_iToIndex |
Current movment's name.
|
protected |
CCAnimationData save all MovementDatas this animation used.
| CCArmature* m_pArmature |
CCMovementData save all MovementFrameDatas this animation used.
| CCMovementData* m_pMovementData |
| CCArray* m_pTweenList |
The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
| CCObject* m_pUserObject |
|
protected |
FrameEvent CallFunc.
| CCBone*,a | CCBone |
| const | char*, the name of this frame event |
| int,origin | frame index |
| int,current | frame index, animation may be delayed |
| std::queue<CCFrameEvent*> m_sFrameEventQueue |
|
protected |
|
protected |
MovementEvent CallFunc.
| CCArmature* | a CCArmature |
| MovementEventType,Event | Type, like START, COMPLETE. |
| const | char*, Movement ID, also called Movement Name |
| std::queue<CCMovementEvent*> m_sMovementEventQueue |
|
protected |
| std::vector<std::string> m_sMovementList |
| std::string m_strMovementID |
A weak reference of armature.
| unsigned int m_uMovementIndex |