#include <CCTween.h>
Public Member Functions | |
Tween (void) | |
virtual | ~Tween (void) |
virtual bool | init (Bone *bone) |
Init with a Bone. More... | |
virtual void | play (MovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing) |
Start the Process. More... | |
void | setAnimation (ArmatureAnimation *animation) |
ArmatureAnimation * | getAnimation () const |
virtual void | gotoAndPlay (int frameIndex) |
virtual void | gotoAndPause (int frameIndex) |
virtual void | setMovementBoneData (MovementBoneData *data) |
virtual const MovementBoneData * | getMovementBoneData () const |
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 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 () |
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 Object | |
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... | |
unsigned int | getReferenceCount () const |
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 Tween * | create (Bone *bone) |
@ More... | |
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 (FrameData *from, FrameData *to, bool limit=true) |
Calculate the between value of _from and _to, and give it to between frame data. More... | |
virtual FrameData * | tweenNodeTo (float percent, FrameData *node=nullptr) |
According to the percent to calculate current FrameData with tween effect. More... | |
virtual void | tweenColorTo (float percent, FrameData *node) |
According to the percent to calculate current color with tween effect. More... | |
virtual void | arriveKeyFrame (FrameData *keyFrameData) |
Update display index and process the key frame event when arrived a key frame. More... | |
Protected Member Functions inherited from ProcessBase | |
virtual void | gotoFrame (int frameIndex) |
Protected Attributes | |
MovementBoneData * | _movementBoneData |
A weak reference to the current MovementBoneData. The data is in the data pool. More... | |
FrameData * | _tweenData |
FrameData * | _from |
The computational tween frame data, //! A weak reference to the Bone's tweenData. More... | |
FrameData * | _to |
From frame data, used for calculate between value. More... | |
FrameData * | _between |
To frame data, used for calculate between value. More... | |
Bone * | _bone |
Between frame data, used for calculate current FrameData(m_pNode) value. More... | |
TweenType | _frameTweenEasing |
A weak reference to the Bone. More... | |
int | _betweenDuration |
Dedermine which tween effect current frame use. More... | |
int | _totalDuration |
Current key frame will last _betweenDuration frames. More... | |
int | _fromIndex |
int | _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
ArmatureAnimation * | _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
bool | _passLastFrame |
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... | |
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 Object | |
unsigned int | _referenceCount |
count of references More... | |
Additional Inherited Members | |
Public Attributes inherited from Object | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
Tween | ( | void | ) |
|
virtual |
|
protectedvirtual |
Update display index and process the key frame event when arrived a key frame.
|
inline |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Start the Process.
movementBoneData | the MovementBoneData include all FrameData |
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 MovementData 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 MovementData get from Action Editor -1 : fade out 0 : line 1 : fade in 2 : fade in and out |
|
inline |
Calculate the between value of _from and _to, and give it to between frame data.
|
inlinevirtual |
|
protectedvirtual |
According to the percent to calculate current color with tween effect.
According to the percent to calculate current FrameData 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 ProcessBase.
|
protected |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
|
protected |
To frame data, used for calculate between value.
|
protected |
Dedermine which tween effect current frame use.
|
protected |
Between frame data, used for calculate current FrameData(m_pNode) value.
|
protected |
The computational tween frame data, //! A weak reference to the Bone's tweenData.
|
protected |
|
protected |
A weak reference to the current MovementBoneData. The data is in the data pool.
|
protected |
|
protected |
From frame data, used for calculate between value.
|
protected |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
|
protected |
Current key frame will last _betweenDuration frames.
|
protected |