#include <CCArmatureAnimation.h>
Public Member Functions | |
ArmatureAnimation () | |
ctor () | |
ArmatureAnimation () | |
virtual | ~ArmatureAnimation (void) |
virtual bool | init (Armature *armature) |
Init with a Armature. More... | |
var | init ( var armature) |
Init with a Armature. More... | |
local | init ( local armature) |
Init with a Armature. More... | |
virtual void | setAnimationScale (float animationScale) |
Scale animation play speed. More... | |
var | setAnimationScale ( var animationScale) |
Scale animation play speed. More... | |
local | setAnimationScale ( local animationScale) |
Scale animation play speed. More... | |
virtual float | getAnimationScale () const |
var | getAnimationScale () |
local | getAnimationScale () |
virtual void | setSpeedScale (float speedScale) |
Scale animation play speed. More... | |
local | setSpeedScale ( local speedScale) |
Scale animation play speed. More... | |
virtual float | getSpeedScale () const |
var | getSpeedScale () |
local | getSpeedScale () |
virtual void | setAnimationInternal (float animationInternal) |
The animation update speed. More... | |
var | setAnimationInternal ( var animationInternal) |
The animation update speed. More... | |
local | setAnimationInternal ( local 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... | |
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... | |
local | playByIndex ( local animationIndex, local 1, local 1, local 1, local TWEEN_EASING_MAX) |
Play animation by index, the other param is the same to play. More... | |
virtual void | pause () |
Pause the Process. More... | |
var | pause () |
Pause the Process. More... | |
local | pause () |
Pause the Process. More... | |
virtual void | resume () |
Resume the Process. More... | |
var | resume () |
Resume the Process. More... | |
local | resume () |
Resume the Process. More... | |
virtual void | stop () |
Stop the Process. More... | |
var | stop () |
Stop the Process. More... | |
local | 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... | |
local | update ( local 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... | |
local | getCurrentMovementID () |
Get current movementID. More... | |
void | setMovementEventCallFunc (Object *target, SEL_MovementEventCallFunc callFunc) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(NULL, NULL);. More... | |
void | setFrameEventCallFunc (Object *target, SEL_FrameEventCallFunc callFunc) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(NULL, NULL);. More... | |
virtual AnimationData * | getAnimationData (void) |
getAnimationData More... | |
local | getAnimationData () |
getAnimationData More... | |
virtual void | setAnimationData (AnimationData *var) |
setAnimationData More... | |
var | setAnimationData ( var var) |
setAnimationData More... | |
local | setAnimationData ( local var) |
setAnimationData More... | |
![]() | |
ProcessBase (void) | |
~ProcessBase (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 () |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
void | release () |
Release the ownership immediately. More... | |
void | retain () |
Retains the ownership. More... | |
Object * | autorelease () |
Release the ownership sometime soon automatically. More... | |
bool | isSingleReference () const |
Returns a boolean value that indicates whether there is only one reference to the object. More... | |
unsigned int | retainCount () const |
Returns the object's current reference count. More... | |
virtual bool | isEqual (const Object *object) |
Returns a boolean value that indicates whether this object and a given object are equal. More... | |
virtual void | acceptVisitor (DataVisitor &visitor) |
Static Public Member Functions | |
static ArmatureAnimation * | create (Armature *armature) |
Create with a Armature. More... | |
Public Attributes | |
float | _speedScale |
Scale the animation speed. More... | |
MovementData * | _movementData |
Armature * | _armature |
MovementData save all MovementFrameDatas this animation used. More... | |
var | _armature |
MovementData save all MovementFrameDatas this animation used. More... | |
local | _armature |
MovementData save all MovementFrameDatas this animation used. More... | |
std::string | _movementID |
A weak reference of armature. More... | |
var | _movementID |
A weak reference of armature. More... | |
local | _movementID |
A weak reference of armature. More... | |
int | _toIndex |
Current movment's name. More... | |
var | _toIndex |
Current movment's name. More... | |
local | _toIndex |
Current movment's name. More... | |
Array * | _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
![]() | |
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... | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
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... | |
local | updateFrameData ( local currentPercent) |
Update current key frame, and process auto stop, pause. More... | |
void | frameEvent (Bone *bone, const char *frameEventName, int originFrameIndex, int currentFrameIndex) |
Emit a frame event. More... | |
Protected Attributes | |
AnimationData * | _animationData |
AnimationData save all MovementDatas this animation used. More... | |
var | _animationData |
AnimationData save all MovementDatas this animation used. More... | |
local | _animationData |
AnimationData save all MovementDatas this animation used. More... | |
SEL_MovementEventCallFunc | _movementEventCallFunc |
MovementEvent CallFunc. More... | |
var | _movementEventCallFunc |
MovementEvent CallFunc. More... | |
SEL_FrameEventCallFunc | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
var | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
local | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
Object * | _movementEventTarget |
Object * | _frameEventTarget |
![]() | |
float | _processScale |
Scale the process speed. More... | |
bool | _isPause |
Set and get whether the aniamtion is pause. More... | |
bool | _isComplete |
Set and get whether the aniamtion is complete. More... | |
bool | _isPlaying |
Set and get whether the aniamtion is playing. More... | |
float | _currentPercent |
Current percent this process arrived. More... | |
int | _rawDuration |
The raw duration. More... | |
AnimationType | _loopType |
The animation whether or not loop. More... | |
CCTweenType | _tweenEasing |
The tween easing effect. More... | |
float | _animationInternal |
The animation update speed. More... | |
int | _durationTween |
The durantion frame count will run. More... | |
float | _currentFrame |
Current frame this process arrived, this frame is tween frame. More... | |
int | _curFrameIndex |
Frame index it the time line. More... | |
int | _nextFrameIndex |
Next frame this process need run to. More... | |
bool | _isLoopBack |
![]() | |
unsigned int | _reference |
count of references More... | |
var | _reference |
count of references More... | |
local | _reference |
count of references More... | |
unsigned int | _autoReleaseCount |
count of autorelease More... | |
var | _autoReleaseCount |
count of autorelease More... | |
local | _autoReleaseCount |
count of autorelease More... | |
Friends | |
class | Tween |
var ctor | ( | ) |
local ArmatureAnimation | ( | ) |
|
virtual |
|
static |
Create with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
static |
Create with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
static |
Create with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
protected |
Emit a frame event.
|
protected |
Emit a frame event.
|
protected |
Emit a frame event.
|
virtual |
getAnimationData
|
virtual |
getAnimationData
|
virtual |
getAnimationData
|
virtual |
|
virtual |
|
virtual |
std::string getCurrentMovementID | ( | ) |
Get current movementID.
var getCurrentMovementID | ( | ) |
Get current movementID.
local getCurrentMovementID | ( | ) |
Get current movementID.
int getMovementCount | ( | ) |
Get movement count.
var getMovementCount | ( | ) |
Get movement count.
local getMovementCount | ( | ) |
Get movement count.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Init with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
virtual |
Init with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
virtual |
Init with a Armature.
armature | The Armature ArmatureAnimation will bind to |
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
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 MovementData 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 MovementData get from flash design panel
loop | Whether the animation is loop loop < 0 : use the value from MovementData get from flash design panel loop = 0 : this animation is not loop loop > 0 : this animation is loop |
tweenEasing | Tween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from MovementData 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 MovementData 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 MovementData get from flash design panel
loop | Whether the animation is loop loop < 0 : use the value from MovementData get from flash design panel loop = 0 : this animation is not loop loop > 0 : this animation is loop |
tweenEasing | Tween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from MovementData get from flash design panel -1 : fade out 0 : line 1 : fade in 2 : fade in and out |
local play | ( | local | animationName, |
local | durationTo = -1 , |
||
local | durationTween = -1 , |
||
local | loop = -1 , |
||
local | 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 MovementData 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 MovementData get from flash design panel
loop | Whether the animation is loop loop < 0 : use the value from MovementData get from flash design panel loop = 0 : this animation is not loop loop > 0 : this animation is loop |
tweenEasing | Tween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from MovementData 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 |
local playByIndex | ( | local | animationIndex, |
local | durationTo = -1 , |
||
local | durationTween = -1 , |
||
local | loop = -1 , |
||
local | 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 ProcessBase.
|
virtual |
Resume the Process.
Reimplemented from ProcessBase.
|
virtual |
Resume the Process.
Reimplemented from ProcessBase.
|
virtual |
setAnimationData
|
virtual |
setAnimationData
|
virtual |
setAnimationData
|
virtual |
The animation update speed.
|
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 |
|
virtual |
Scale animation play speed.
animationScale | Scale value |
void setFrameEventCallFunc | ( | Object * | 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);.
local setFrameEventCallFunc | ( | local | target, |
local | callFunc | ||
) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(NULL, NULL);.
void setMovementEventCallFunc | ( | Object * | 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);.
local setMovementEventCallFunc | ( | local | target, |
local | 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 |
Scale animation play speed.
animationScale | Scale value |
|
virtual |
Stop the Process.
Reimplemented from ProcessBase.
|
virtual |
Stop the Process.
Reimplemented from ProcessBase.
|
virtual |
Stop the Process.
Reimplemented from ProcessBase.
|
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 ProcessBase.
|
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 ProcessBase.
|
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 ProcessBase.
|
protected |
Update current key frame, and process auto stop, pause.
|
protected |
Update current key frame, and process auto stop, pause.
|
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 ProcessBase.
|
protectedvirtual |
Update(float dt) will call this handler, you can handle your logic here.
Reimplemented from ProcessBase.
|
protectedvirtual |
Update(float dt) will call this handler, you can handle your logic here.
Reimplemented from ProcessBase.
|
friend |
|
protected |
AnimationData save all MovementDatas this animation used.
|
protected |
AnimationData save all MovementDatas this animation used.
|
protected |
AnimationData save all MovementDatas this animation used.
Armature* _armature |
MovementData save all MovementFrameDatas this animation used.
var _armature |
MovementData save all MovementFrameDatas this animation used.
local _armature |
MovementData save all MovementFrameDatas this animation used.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
MovementData* _movementData |
var _movementData |
local _movementData |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
std::string _movementID |
A weak reference of armature.
var _movementID |
A weak reference of armature.
local _movementID |
A weak reference of armature.
float _speedScale |
Scale the animation speed.
var _speedScale |
Scale the animation speed.
local _speedScale |
Scale the animation speed.
int _toIndex |
Current movment's name.
var _toIndex |
Current movment's name.
local _toIndex |
Current movment's name.
Array* _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
var _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
local _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.