#include <CCArmatureAnimation.h>
Public Member Functions | |
| CCArmatureAnimation () | |
| virtual | ~CCArmatureAnimation (void) |
| var | ~CCArmatureAnimation () |
| virtual bool | init (CCArmature *armature) |
| Init with a CCArmature. More... | |
| var | init ( var armature) |
| Init with a CCArmature. More... | |
| virtual void | setAnimationScale (float animationScale) |
| Scale animation play speed. More... | |
| virtual float | getAnimationScale () const |
| virtual void | setSpeedScale (float speedScale) |
| Scale animation play speed. More... | |
| virtual float | getSpeedScale () const |
| virtual void | setAnimationInternal (float animationInternal) |
| The animation update speed. More... | |
| 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... | |
| var | play ( var animationName, var 1, var 1, var 1, var TWEEN_EASING_MAX) |
| Play animation by animation name. More... | |
| 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 | pause () |
| Pause the Process. More... | |
| virtual void | resume () |
| Resume the Process. More... | |
| var | resume () |
| Resume the Process. More... | |
| virtual void | stop () |
| Stop the Process. More... | |
| var | stop () |
| Stop the Process. More... | |
| int | getMovementCount () |
| Get movement count. More... | |
| var | 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... | |
| var | 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... | |
| var | setMovementEventCallFunc ( var target, var 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 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 (void *animation, int durationTo, int durationTween, int loop, int tweenEasing) |
| Play animation by animation name. More... | |
| virtual void | gotoFrame (int frameIndex) |
| 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... | |
| var | m_fSpeedScale |
| Scale the animation speed. More... | |
| CCMovementData * | m_pMovementData |
| CCArmature * | m_pArmature |
| CCMovementData save all MovementFrameDatas this animation used. More... | |
| var | 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... | |
| var | m_pTweenList |
| The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
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... | |
| virtual float | getAnimationInternal (void)\n\n public |
| getAnimationInternal 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... | |
Protected Attributes | |
| CCAnimationData * | m_pAnimationData |
| CCAnimationData save all MovementDatas this animation used. More... | |
| var | m_pAnimationData |
| CCAnimationData save all MovementDatas this animation used. More... | |
| SEL_MovementEventCallFunc | m_sMovementEventCallFunc |
| MovementEvent CallFunc. More... | |
| SEL_FrameEventCallFunc | m_sFrameEventCallFunc |
| FrameEvent CallFunc. More... | |
| var | 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... | |
| float | m_fAnimationInternal |
| The animation update speed. 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 |
Protected Attributes inherited from CCObject | |
| unsigned int | m_uReference |
| unsigned int | m_uAutoReleaseCount |
Friends | |
| class | CCTween |
| var CCArmatureAnimation | ( | ) |
|
virtual |
|
virtual |
|
static |
@
|
static |
@
|
protected |
Emit a frame event.
|
virtual |
getAnimationData
|
virtual |
getAnimationData
|
virtual |
|
virtual |
| std::string getCurrentMovementID | ( | ) |
Get current movementID.
| var getCurrentMovementID | ( | ) |
Get current movementID.
| int getMovementCount | ( | ) |
Get movement count.
| var getMovementCount | ( | ) |
Get movement count.
|
virtual |
|
virtual |
|
virtual |
Init with a CCArmature.
| armature | The CCArmature CCArmatureAnimation will bind to |
|
virtual |
Init with a CCArmature.
| armature | The CCArmature CCArmatureAnimation will bind to |
|
virtual |
Pause the Process.
Reimplemented from CCProcessBase.
|
virtual |
Pause the Process.
Reimplemented from CCProcessBase.
| void play | ( | const char * | animationName, |
| int | durationTo = -1, |
||
| int | durationTween = -1, |
||
| int | loop = -1, |
||
| int | tweenEasing = TWEEN_EASING_MAX |
||
| ) |
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 |
| var play | ( | var | animationName, |
| var | durationTo = -1, |
||
| var | durationTween = -1, |
||
| var | loop = -1, |
||
| var | tweenEasing = TWEEN_EASING_MAX |
||
| ) |
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 |
| 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.
| _animationIndex | the animation index you want to play |
| var playByIndex | ( | var | animationIndex, |
| var | durationTo = -1, |
||
| var | durationTween = -1, |
||
| var | loop = -1, |
||
| var | tweenEasing = TWEEN_EASING_MAX |
||
| ) |
Play animation by index, the other param is the same to play.
| _animationIndex | the animation index you want to play |
|
virtual |
Resume the Process.
Reimplemented from CCProcessBase.
|
virtual |
Resume the Process.
Reimplemented from CCProcessBase.
|
virtual |
setAnimationData
|
virtual |
setAnimationData
|
virtual |
The animation update speed.
|
virtual |
The animation update speed.
|
virtual |
Scale animation play speed.
| animationScale | Scale value |
|
virtual |
Scale animation play speed.
| 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);.
| var setFrameEventCallFunc | ( | var | target, |
| var | 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);.
| var setMovementEventCallFunc | ( | var | target, |
| var | 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 |
Scale animation play speed.
| animationScale | Scale value |
|
virtual |
Stop the Process.
Reimplemented from CCProcessBase.
|
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.
|
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.
|
friend |
| float m_fSpeedScale |
Scale the animation speed.
| var m_fSpeedScale |
Scale the animation speed.
| int m_iToIndex |
Current movment's name.
| var m_iToIndex |
Current movment's name.
|
protected |
CCAnimationData save all MovementDatas this animation used.
|
protected |
CCAnimationData save all MovementDatas this animation used.
| CCArmature* m_pArmature |
CCMovementData save all MovementFrameDatas this animation used.
| var m_pArmature |
CCMovementData save all MovementFrameDatas this animation used.
| CCMovementData* m_pMovementData |
| var m_pMovementData |
| CCArray* m_pTweenList |
The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
| var m_pTweenList |
The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
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 |
|
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 |
|
protected |
|
protected |
|
protected |
MovementEvent CallFunc.
| CCArmature* | a CCArmature |
| MovementEventType,Event | Type, like START, COMPLETE. |
| const | char*, Movement ID, also called Movement Name |
|
protected |
MovementEvent CallFunc.
| CCArmature* | a CCArmature |
| MovementEventType,Event | Type, like START, COMPLETE. |
| const | char*, Movement ID, also called Movement Name |
|
protected |
|
protected |
| std::string m_strMovementID |
A weak reference of armature.
| var m_strMovementID |
A weak reference of armature.