#include <CCArmatureAnimation.h>
Public Member Functions | |
CCArmatureAnimation () | |
virtual | ~CCArmatureAnimation (void) |
virtual bool | init (CCArmature *armature) |
Init with a CCArmature. More... | |
var | init ( var 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... | |
var | setSpeedScale ( var speedScale) |
Scale animation play speed. More... | |
virtual float | getSpeedScale () const |
virtual CC_DEPRECATED_ATTRIBUTE void | setAnimationInternal (float animationInternal) |
The animation update speed. More... | |
var | setAnimationInternal ( var 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... | |
var | play ( var animationName, var 1, var 1, var 1, var 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... | |
var | playByIndex ( var animationIndex, var 1, var 1, var 1, var 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... | |
var | playWithNames ( var movementNames, var 1, var 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) |
var | playWithIndexArray ( var movementIndexes, var 1, var 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... | |
var | 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... | |
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 CCObject * | getUserObject () |
Returns a user assigned CCObject. More... | |
virtual void | setUserObject (CCObject *pUserObject) |
Returns a user assigned CCObject. More... | |
cocos2d::CCDictionary * | getScriptObjectDict () |
Returns a user assigned CCDictionary. More... | |
void | setScriptObjectDict (cocos2d::CCDictionary *pScriptObjectDict) |
Returns a user assigned CCObject. More... | |
var | setScriptObjectDict ( var pScriptObjectDict) |
Returns a user assigned CCObject. More... | |
virtual CCAnimationData * | getAnimationData (void) |
getAnimationData More... | |
virtual void | setAnimationData (CCAnimationData *var) |
setAnimationData More... | |
![]() | |
CCProcessBase (void) | |
~CCProcessBase (void) | |
virtual void | play (int durationTo, int durationTween, int loop, int tweenEasing) |
Play animation by animation name. More... | |
virtual int | getCurrentFrameIndex () |
![]() | |
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) |
![]() | |
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... | |
var | 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... | |
bool | m_bIgnoreFrameEvent |
std::queue< CCFrameEvent * > | m_sFrameEventQueue |
var | 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 |
cocos2d::CCDictionary * | m_pScriptObjectDict |
var | m_pScriptObjectDict |
![]() | |
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... | |
![]() | |
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 () |
![]() | |
virtual void | gotoFrame (int frameIndex) |
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... | |
CCObject * | m_sMovementEventTarget |
CCObject * | m_sFrameEventTarget |
![]() | |
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... | |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
Friends | |
class | CCTween |
var ctor | ( | ) |
|
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.
cocos2d::CCDictionary* getScriptObjectDict |
( | ) |
Returns a user assigned CCDictionary.
var getScriptObjectDict | ( | ) |
Returns a user assigned CCDictionary.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Go to specified frame and pause current movement.
|
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 |
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 |
|
virtual |
Init with a CCArmature.
armature | The CCArmature CCArmatureAnimation will bind to |
|
inlineprotected |
|
inlineprotected |
|
protected |
Emit a movement event.
|
protected |
Emit a movement event.
|
virtual |
Pause the Process.
Reimplemented from CCProcessBase.
|
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 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 |
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 |
|
virtual |
|
virtual |
|
virtual |
Play several animation by indexes.
|
virtual |
Play several animation by indexes.
|
virtual |
Play several animation by names.
|
virtual |
Play several animation by names.
|
virtual |
Resume the Process.
Reimplemented from CCProcessBase.
|
virtual |
Resume the Process.
Reimplemented from CCProcessBase.
|
virtual |
setAnimationData
|
virtual |
setAnimationData
|
inlinevirtual |
The animation update speed.
|
inlinevirtual |
The animation update speed.
|
virtual |
Scale animation play speed.
This method is deprecated, please use setSpeedScale.
animationScale | Scale value |
|
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);.
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);.
void setScriptObjectDict | ( | cocos2d::CCDictionary * | pScriptObjectDict | ) |
var setScriptObjectDict | ( | var | pScriptObjectDict | ) |
|
virtual |
Scale animation play speed.
animationScale | Scale value |
|
virtual |
Scale animation play speed.
animationScale | Scale value |
|
virtual |
|
virtual |
|
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.
|
protected |
|
protected |
|
friend |
bool m_bIgnoreFrameEvent |
var m_bIgnoreFrameEvent |
bool m_bMovementListLoop |
var m_bMovementListLoop |
bool m_bOnMovementList |
var m_bOnMovementList |
float m_fSpeedScale |
Scale the animation speed.
var m_fSpeedScale |
Scale the animation speed.
int m_iMovementListDurationTo |
var m_iMovementListDurationTo |
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 |
cocos2d::CCDictionary* m_pScriptObjectDict |
var m_pScriptObjectDict |
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.
CCObject* m_pUserObject |
var 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 |
|
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 |
var m_sFrameEventQueue |
|
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 |
std::queue<CCMovementEvent*> m_sMovementEventQueue |
var m_sMovementEventQueue |
|
protected |
|
protected |
std::vector<std::string> m_sMovementList |
var m_sMovementList |
std::string m_strMovementID |
A weak reference of armature.
var m_strMovementID |
A weak reference of armature.
unsigned int m_uMovementIndex |
var m_uMovementIndex |