#include <CCTween.h>
Public Member Functions | |
CCTween (void) | |
virtual | ~CCTween (void) |
virtual bool | init (CCBone *bone) |
Init with a CCBone. More... | |
virtual void | play (CCMovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing) |
Start the Process. More... | |
virtual void | gotoAndPlay (int frameIndex) |
virtual void | gotoAndPause (int frameIndex) |
void | setAnimation (CCArmatureAnimation *animation) |
CCArmatureAnimation * | getAnimation () const |
Public Member Functions inherited from CCProcessBase | |
CCProcessBase (void) | |
~CCProcessBase (void) | |
virtual void | play (int durationTo, int durationTween, int loop, int tweenEasing) |
Play animation by animation name. More... | |
virtual void | pause () |
Pause the Process. More... | |
virtual void | resume () |
Resume the Process. More... | |
virtual void | stop () |
Stop the Process. More... | |
virtual 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... | |
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 CCTween * | create (CCBone *bone) |
@ More... | |
Public Attributes | |
virtual CCMovementBoneData *getMovementBoneData(void)\n\n public CCFrameData * | m_pTweenData |
getMovementBoneData More... | |
CCFrameData * | m_pFrom |
The computational tween frame data, //! A weak reference to the CCBone's tweenData. More... | |
CCFrameData * | m_pTo |
From frame data, used for calculate between value. More... | |
CCFrameData * | m_pBetween |
To frame data, used for calculate between value. More... | |
CCBone * | m_pBone |
Between frame data, used for calculate current CCFrameData(m_pNode) value. More... | |
CCTweenType | m_eFrameTweenEasing |
A weak reference to the CCBone. More... | |
int | m_iBetweenDuration |
Dedermine which tween effect current frame use. More... | |
int | m_iTotalDuration |
Current key frame will last m_iBetweenDuration frames. More... | |
int | m_iFromIndex |
int | m_iToIndex |
The current frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex. More... | |
CCArmatureAnimation * | m_pAnimation |
The next frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex. More... | |
bool | m_bPassLastFrame |
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... | |
Public Attributes inherited from CCObject | |
unsigned int | m_uID |
int | m_nLuaID |
Protected Member Functions | |
virtual void | updateHandler () |
Update(float dt) will call this handler, you can handle your logic here. More... | |
virtual float | updateFrameData (float currentPercent) |
Calculate which frame arrived, and if current frame have event, then call the event listener. More... | |
virtual void | setBetween (CCFrameData *from, CCFrameData *to, bool limit=true) |
Calculate the between value of _from and _to, and give it to between frame data. More... | |
virtual CCFrameData * | tweenNodeTo (float percent, CCFrameData *node=NULL) |
According to the percent to calculate current CCFrameData with tween effect. More... | |
virtual void | tweenColorTo (float percent, CCFrameData *node) |
According to the percent to calculate current color with tween effect. More... | |
virtual void | arriveKeyFrame (CCFrameData *keyFrameData) |
Update display index and process the key frame event when arrived a key frame. More... | |
Protected Member Functions inherited from CCProcessBase | |
virtual void | gotoFrame (int frameIndex) |
Protected Attributes | |
CCMovementBoneData * | m_pMovementBoneData |
A weak reference to the current CCMovementBoneData. The data is in the data pool. More... | |
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... | |
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... | |
Protected Attributes inherited from CCObject | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
CCTween | ( | void | ) |
|
virtual |
|
protectedvirtual |
Update display index and process the key frame event when arrived a key frame.
|
inline |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Start the Process.
movementBoneData | the CCMovementBoneData include all CCFrameData |
durationTo | the number of frames changing to this animation needs. |
durationTween | the number of frames this animation actual last. |
loop | whether the animation is loop loop < 0 : use the value from CCMovementData get from Action Editor 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 CCMovementData get from Action Editor -1 : fade out 0 : line 1 : fade in 2 : fade in and out |
|
inline |
|
protectedvirtual |
Calculate the between value of _from and _to, and give it to between frame data.
|
protectedvirtual |
According to the percent to calculate current color with tween effect.
|
protectedvirtual |
According to the percent to calculate current CCFrameData with tween effect.
|
protectedvirtual |
Calculate which frame arrived, and if current frame have event, then call the event listener.
|
protectedvirtual |
Update(float dt) will call this handler, you can handle your logic here.
Reimplemented from CCProcessBase.
bool m_bPassLastFrame |
CCTweenType m_eFrameTweenEasing |
A weak reference to the CCBone.
int m_iBetweenDuration |
Dedermine which tween effect current frame use.
int m_iFromIndex |
int m_iToIndex |
The current frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex.
int m_iTotalDuration |
Current key frame will last m_iBetweenDuration frames.
CCArmatureAnimation* m_pAnimation |
The next frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex.
CCFrameData* m_pBetween |
To frame data, used for calculate between value.
CCBone* m_pBone |
Between frame data, used for calculate current CCFrameData(m_pNode) value.
CCFrameData* m_pFrom |
The computational tween frame data, //! A weak reference to the CCBone's tweenData.
|
protected |
A weak reference to the current CCMovementBoneData. The data is in the data pool.
CCFrameData* m_pTo |
From frame data, used for calculate between value.
virtual CCMovementBoneData* getMovementBoneData (void)\n \n public CCFrameData* m_pTweenData |
getMovementBoneData
setMovementBoneData