#include <CCArmatureAnimation.h>
Public Member Functions | |
ArmatureAnimation () | |
virtual | ~ArmatureAnimation (void) |
virtual bool | init (Armature *armature) |
Init with a Armature. More... | |
local | init ( local armature) |
Init with a Armature. More... | |
virtual CC_DEPRECATED_ATTRIBUTE void | setAnimationScale (float animationScale) |
Scale animation play speed. More... | |
local | setAnimationScale ( local animationScale) |
Scale animation play speed. More... | |
virtual CC_DEPRECATED_ATTRIBUTE float | getAnimationScale () const |
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 |
virtual void | setAnimationInternal (float 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... | |
local | play ( local animationName, local 1, local 1, local 1, local 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... | |
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... | |
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 | 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 () const |
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 () const |
Get current movementID. More... | |
local | getCurrentMovementID () |
Get current movementID. More... | |
void | setMovementEventCallFunc (cocos2d::Object *target, SEL_MovementEventCallFunc callFunc) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);. More... | |
void | setFrameEventCallFunc (cocos2d::Object *target, SEL_FrameEventCallFunc callFunc) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);. More... | |
virtual void | setAnimationData (AnimationData *data) |
virtual AnimationData * | getAnimationData () const |
local | getAnimationData () |
virtual Object * | getUserObject () |
Returns a user assigned Object. More... | |
virtual const Object * | getUserObject () const |
virtual void | setUserObject (Object *userObject) |
Returns a user assigned Object. More... | |
![]() | |
ProcessBase (void) | |
virtual | ~ProcessBase (void) |
virtual void | play (int durationTo, int durationTween, int loop, int tweenEasing) |
Play animation by animation name. More... | |
virtual int | getCurrentFrameIndex () |
virtual void | setProcessScale (float processScale) |
virtual float | getProcessScale () const |
virtual void | setIsPause (bool pause) |
virtual bool | isPause () const |
virtual void | setIsComplete (bool complete) |
virtual bool | isComplete () const |
virtual void | setIsPlaying (bool playing) |
virtual bool | isPlaying () const |
virtual float | getCurrentPercent () const |
virtual int | getRawDuration () const |
virtual float | getAnimationInternal () const |
![]() | |
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... | |
local | create ( local armature) |
Create with a Armature. 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... | |
void | frameEvent (Bone *bone, const char *frameEventName, int originFrameIndex, int currentFrameIndex) |
Emit a frame event. More... | |
bool | isIgnoreFrameEvent () const |
var | isIgnoreFrameEvent () |
local | isIgnoreFrameEvent () |
![]() | |
virtual void | gotoFrame (int frameIndex) |
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... | |
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... | |
int | _toIndex |
Current movment's name. More... | |
cocos2d::Array * | _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
var | _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
local | _tweenList |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. More... | |
bool | _ignoreFrameEvent |
std::queue< FrameEvent * > | _frameEventQueue |
var | _frameEventQueue |
local | _frameEventQueue |
cocos2d::Object * | _userObject |
SEL_MovementEventCallFunc | _movementEventCallFunc |
MovementEvent CallFunc. More... | |
var | _movementEventCallFunc |
MovementEvent CallFunc. More... | |
local | _movementEventCallFunc |
MovementEvent CallFunc. More... | |
SEL_FrameEventCallFunc | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
var | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
local | _frameEventCallFunc |
FrameEvent CallFunc. More... | |
cocos2d::Object * | _movementEventTarget |
cocos2d::Object * | _frameEventTarget |
var | _frameEventTarget |
local | _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... | |
TweenType | _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... | |
unsigned int | _autoReleaseCount |
count of autorelease More... | |
Friends | |
class | Tween |
Additional Inherited Members | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
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.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
std::string getCurrentMovementID | ( | ) | const |
Get current movementID.
var getCurrentMovementID | ( | ) |
Get current movementID.
local getCurrentMovementID | ( | ) |
Get current movementID.
int getMovementCount | ( | ) | const |
Get movement count.
var getMovementCount | ( | ) |
Get movement count.
local getMovementCount | ( | ) |
Get movement count.
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
Returns a user assigned Object.
Similar to userData, but instead of holding a void* it holds an object
|
inlinevirtual |
|
virtual |
Go to specified frame and pause current movement.
|
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 |
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 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 |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
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.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
The animation update speed.
Reimplemented from ProcessBase.
|
virtual |
The animation update speed.
Reimplemented from ProcessBase.
|
virtual |
The animation update speed.
Reimplemented from ProcessBase.
|
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 |
|
virtual |
Scale animation play speed.
This method is deprecated, please use setSpeedScale.
animationScale | Scale value |
void setFrameEventCallFunc | ( | cocos2d::Object * | target, |
SEL_FrameEventCallFunc | callFunc | ||
) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);.
var setFrameEventCallFunc | ( | var | target, |
var | callFunc | ||
) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);.
local setFrameEventCallFunc | ( | local | target, |
local | callFunc | ||
) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);.
void setMovementEventCallFunc | ( | cocos2d::Object * | target, |
SEL_MovementEventCallFunc | callFunc | ||
) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);.
var setMovementEventCallFunc | ( | var | target, |
var | callFunc | ||
) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);.
local setMovementEventCallFunc | ( | local | target, |
local | callFunc | ||
) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);.
|
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 |
Returns a user assigned Object.
Similar to UserData, but instead of holding a void* it holds an object. The UserObject will be retained once in this method, and the previous UserObject (if existed) will be relese. The UserObject will be released in Node's destructure.
userObject | A user assigned Object |
|
virtual |
Returns a user assigned Object.
Similar to UserData, but instead of holding a void* it holds an object. The UserObject will be retained once in this method, and the previous UserObject (if existed) will be relese. The UserObject will be released in Node's destructure.
userObject | A user assigned Object |
|
virtual |
Returns a user assigned Object.
Similar to UserData, but instead of holding a void* it holds an object. The UserObject will be retained once in this method, and the previous UserObject (if existed) will be relese. The UserObject will be released in Node's destructure.
userObject | A user assigned Object |
|
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.
|
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.
|
protected |
MovementData save all MovementFrameDatas this animation used.
|
protected |
MovementData save all MovementFrameDatas this animation used.
|
protected |
MovementData save all MovementFrameDatas this animation used.
|
protected |
FrameEvent CallFunc.
Bone*,a | Bone |
const | char*, the name of this frame event |
int,origin | frame index |
int,current | frame index, animation may be delayed |
|
protected |
FrameEvent CallFunc.
Bone*,a | Bone |
const | char*, the name of this frame event |
int,origin | frame index |
int,current | frame index, animation may be delayed |
|
protected |
FrameEvent CallFunc.
Bone*,a | Bone |
const | char*, the name of this frame event |
int,origin | frame index |
int,current | frame index, animation may be delayed |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
MovementEvent CallFunc.
Armature* | a Armature |
MovementEventType,Event | Type, like START, COMPLETE. |
const | char*, Movement ID, also called Movement Name |
|
protected |
MovementEvent CallFunc.
Armature* | a Armature |
MovementEventType,Event | Type, like START, COMPLETE. |
const | char*, Movement ID, also called Movement Name |
|
protected |
MovementEvent CallFunc.
Armature* | a Armature |
MovementEventType,Event | Type, like START, COMPLETE. |
const | char*, Movement ID, also called Movement Name |
|
protected |
|
protected |
|
protected |
|
protected |
A weak reference of armature.
|
protected |
A weak reference of armature.
|
protected |
A weak reference of armature.
|
protected |
Scale the animation speed.
|
protected |
Scale the animation speed.
|
protected |
Scale the animation speed.
|
protected |
Current movment's name.
|
protected |
Current movment's name.
|
protected |
Current movment's name.
|
protected |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
protected |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
protected |
The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
protected |
|
protected |
|
protected |