#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 CC_DEPRECATED_ATTRIBUTE void | setAnimationInternal (float animationInternal) |
The animation update speed. More... | |
local | setAnimationInternal ( local animationInternal) |
The animation update speed. More... | |
virtual void | play (const std::string &animationName, int durationTo=-1, int loop=-1) |
Play animation by animation name. More... | |
local | play ( local animationName, local 1, local 1) |
Play animation by animation name. More... | |
virtual CC_DEPRECATED_ATTRIBUTE void | playByIndex (int animationIndex, int durationTo=-1, int loop=-1) |
Play animation by index, the other param is the same to play. More... | |
local | playByIndex ( local animationIndex, local 1, local 1) |
Play animation by index, the other param is the same to play. More... | |
virtual void | playWithIndex (int animationIndex, int durationTo=-1, int loop=-1) |
virtual void | playWithNames (const std::vector< std::string > &movementNames, int durationTo=-1, bool loop=true) |
virtual void | playWithIndexes (const std::vector< int > &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... | |
ssize_t | getMovementCount () const |
Get movement count. More... | |
local | 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 () const |
Get current movementID. More... | |
local | getCurrentMovementID () |
Get current movementID. More... | |
CC_DEPRECATED_ATTRIBUTE void | setMovementEventCallFunc (cocos2d::Ref *target, SEL_MovementEventCallFunc callFunc) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);. More... | |
local | setMovementEventCallFunc ( local target, local callFunc) |
Set armature's movement event callback function To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);. More... | |
CC_DEPRECATED_ATTRIBUTE void | setFrameEventCallFunc (cocos2d::Ref *target, SEL_FrameEventCallFunc callFunc) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);. More... | |
local | setFrameEventCallFunc ( local target, local callFunc) |
Set armature's frame event callback function To disconnect this event, just setFrameEventCallFunc(nullptr, nullptr);. More... | |
void | setMovementEventCallFunc (std::function< void(Armature *armature, MovementEventType movementType, const std::string &movementID)> listener) |
void | setFrameEventCallFunc (std::function< void(Bone *bone, const std::string &frameEventName, int originFrameIndex, int currentFrameIndex)> listener) |
virtual void | setAnimationData (AnimationData *data) |
virtual AnimationData * | getAnimationData () const |
local | getAnimationData () |
virtual Ref * | getUserObject () |
Returns a user assigned Object. More... | |
virtual const Ref * | getUserObject () const |
virtual void | setUserObject (Ref *userObject) |
Returns a user assigned Object. More... | |
Public Member Functions inherited from ProcessBase | |
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 |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Release the ownership immediately. More... | |
Ref * | autorelease () |
Release the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
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 std::string &frameEventName, int originFrameIndex, int currentFrameIndex) |
Emit a frame event. More... | |
void | movementEvent (Armature *armature, MovementEventType movementType, const std::string &movementID) |
Emit a movement event. More... | |
void | updateMovementList () |
bool | isIgnoreFrameEvent () const |
Protected Member Functions inherited from ProcessBase | |
virtual void | gotoFrame (int frameIndex) |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
AnimationData * | _animationData |
AnimationData save all MovementDatas this animation used. More... | |
var | _animationData |
AnimationData save all MovementDatas this animation used. More... | |
float | _speedScale |
Scale the animation speed. More... | |
var | _speedScale |
Scale the animation speed. More... | |
local | _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::Vector< Tween * > | _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 |
std::queue< MovementEvent * > | _movementEventQueue |
var | _movementEventQueue |
local | _movementEventQueue |
std::vector< std::string > | _movementList |
var | _movementList |
local | _movementList |
bool | _onMovementList |
bool | _movementListLoop |
var | _movementListLoop |
local | _movementListLoop |
unsigned int | _movementIndex |
int | _movementListDurationTo |
var | _movementListDurationTo |
local | _movementListDurationTo |
cocos2d::Ref * | _userObject |
var | _userObject |
local | _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::Ref * | _movementEventTarget |
cocos2d::Ref * | _frameEventTarget |
std::function< void(Armature *armature, MovementEventType movementType, const std::string &movementID)> | _movementEventListener |
std::function< void(Bone *bone, const std::string &frameEventName, int originFrameIndex, int currentFrameIndex)> | _frameEventListener |
Protected Attributes inherited from ProcessBase | |
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... | |
cocos2d::tweenfunc::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 |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references 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.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
std::string getCurrentMovementID | ( | ) | const |
Get current movementID.
var getCurrentMovementID | ( | ) |
Get current movementID.
local getCurrentMovementID | ( | ) |
Get current movementID.
ssize_t 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 |
|
protected |
Emit a movement event.
|
protected |
Emit a movement event.
|
protected |
Emit a movement event.
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
|
virtual |
Pause the Process.
Reimplemented from ProcessBase.
|
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 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 |
|
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 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 |
|
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 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 |
|
virtual |
Play animation by index, the other param is the same to play.
animationIndex | the animation index you want to play |
|
virtual |
Play animation by index, the other param is the same to play.
animationIndex | the animation index you want to play |
|
virtual |
Play animation by index, the other param is the same to play.
animationIndex | the animation index you want to play |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Resume the Process.
Reimplemented from ProcessBase.
|
virtual |
Resume the Process.
Reimplemented from ProcessBase.
|
virtual |
Resume the Process.
Reimplemented from ProcessBase.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
The animation update speed.
|
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 |
|
virtual |
Scale animation play speed.
This method is deprecated, please use setSpeedScale.
animationScale | Scale value |
CC_DEPRECATED_ATTRIBUTE void setFrameEventCallFunc |
( | cocos2d::Ref * | 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 setFrameEventCallFunc | ( | std::function< void(Bone *bone, const std::string &frameEventName, int originFrameIndex, int currentFrameIndex)> | listener) |
var setFrameEventCallFunc | ( | var | listener) |
local setFrameEventCallFunc | ( | local | listener) |
CC_DEPRECATED_ATTRIBUTE void setMovementEventCallFunc |
( | cocos2d::Ref * | 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);.
void setMovementEventCallFunc | ( | std::function< void(Armature *armature, MovementEventType movementType, const std::string &movementID)> | listener) |
var setMovementEventCallFunc | ( | var | listener) |
local setMovementEventCallFunc | ( | local | listener) |
|
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.
|
protected |
|
protected |
|
protected |
|
friend |
|
friend |
|
friend |
|
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 |
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
A weak reference of armature.
|
protected |
A weak reference of armature.
|
protected |
A weak reference of armature.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
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 |