#include <CCTween.h>
Public Member Functions | |
Tween (void) | |
virtual | ~Tween (void) |
virtual bool | init (Bone *bone) |
Init with a Bone. More... | |
local | init ( local bone) |
Init with a Bone. More... | |
virtual void | play (MovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing) |
Start the Process. More... | |
local | play ( local movementBoneData, local durationTo, local durationTween, local loop, local tweenEasing) |
Start the Process. More... | |
void | setAnimation (ArmatureAnimation *animation) |
ArmatureAnimation * | getAnimation () const |
local | getAnimation () |
Public Member Functions inherited from ProcessBase | |
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 | pause () |
Pause the Process. More... | |
virtual void | resume () |
Resume the Process. More... | |
virtual void | stop () |
Stop the Process. More... | |
virtual void | gotoFrame (int frameIndex) |
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 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... | |
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) |
Create with a Bone. More... | |
local | create ( local bone) |
Create with a Bone. More... | |
Public Attributes | |
virtual MovementBoneData *getMovementBoneData(void)\n\n public FrameData * | _tweenData |
getMovementBoneData More... | |
FrameData * | _from |
The computational tween frame data, //! A weak reference to the Bone's tweenData. More... | |
var | _from |
The computational tween frame data, //! A weak reference to the Bone's tweenData. More... | |
local | _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... | |
var | _between |
To frame data, used for calculate between value. More... | |
local | _between |
To frame data, used for calculate between value. More... | |
Bone * | _bone |
Between frame data, used for calculate current FrameData(m_pNode) value. More... | |
var | _bone |
Between frame data, used for calculate current FrameData(m_pNode) value. More... | |
local | _bone |
Between frame data, used for calculate current FrameData(m_pNode) value. More... | |
CCTweenType | _frameTweenEasing |
A weak reference to the Bone. More... | |
var | _frameTweenEasing |
A weak reference to the Bone. More... | |
local | _frameTweenEasing |
A weak reference to the Bone. More... | |
int | _betweenDuration |
Dedermine which tween effect current frame use. More... | |
var | _betweenDuration |
Dedermine which tween effect current frame use. More... | |
local | _betweenDuration |
Dedermine which tween effect current frame use. More... | |
int | _totalDuration |
Current key frame will last _betweenDuration frames. More... | |
var | _totalDuration |
Current key frame will last _betweenDuration frames. More... | |
local | _totalDuration |
Current key frame will last _betweenDuration frames. More... | |
int | _fromIndex |
var | _fromIndex |
local | _fromIndex |
int | _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
var | _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
local | _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... | |
var | _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
local | _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex. More... | |
Public Attributes inherited from ProcessBase | |
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... | |
Public Attributes inherited from Object | |
unsigned int | _ID |
object id, ScriptSupport need public _ID More... | |
int | _luaID |
Lua reference id. More... | |
Protected Member Functions | |
virtual void | updateHandler () |
Update(float dt) will call this handler, you can handle your logic here. More... | |
var | updateHandler () |
Update(float dt) will call this handler, you can handle your logic here. More... | |
local | 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... | |
local | updateFrameData ( local 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... | |
var | setBetween ( var from, var to, var true) |
Calculate the between value of _from and _to, and give it to between frame data. More... | |
local | setBetween ( local from, local to, local true) |
Calculate the between value of _from and _to, and give it to between frame data. More... | |
virtual FrameData * | tweenNodeTo (float percent, FrameData *node=NULL) |
According to the percent to calculate current FrameData with tween effect. More... | |
local | tweenNodeTo ( local percent, local NULL) |
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... | |
var | tweenColorTo ( var percent, var node) |
According to the percent to calculate current color with tween effect. More... | |
local | tweenColorTo ( local percent, local 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 Attributes | |
MovementBoneData * | _movementBoneData |
A weak reference to the current MovementBoneData. The data is in the data pool. More... | |
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... | |
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 |
Protected Attributes inherited from Object | |
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... | |
Tween | ( | void | ) |
var ctor | ( | ) |
local Tween | ( | ) |
|
virtual |
|
protectedvirtual |
Update display index and process the key frame event when arrived a key frame.
|
protectedvirtual |
Update display index and process the key frame event when arrived a key frame.
|
protectedvirtual |
Update display index and process the key frame event when arrived a key frame.
|
inline |
|
inline |
|
inline |
|
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 |
|
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 |
|
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 |
|
inline |
|
inline |
Calculate the between value of _from and _to, and give it to between frame data.
|
protectedvirtual |
Calculate the between value of _from and _to, and give it to between frame data.
|
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 color with tween effect.
|
protectedvirtual |
According to the percent to calculate current color with tween effect.
According to the percent to calculate current FrameData with tween effect.
|
protectedvirtual |
According to the percent to calculate current FrameData with tween effect.
|
protectedvirtual |
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 |
Calculate which frame arrived, and if current frame have event, then call the event listener.
|
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.
|
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.
ArmatureAnimation* _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
var _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
local _animation |
The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
FrameData* _between |
To frame data, used for calculate between value.
var _between |
To frame data, used for calculate between value.
local _between |
To frame data, used for calculate between value.
int _betweenDuration |
Dedermine which tween effect current frame use.
var _betweenDuration |
Dedermine which tween effect current frame use.
local _betweenDuration |
Dedermine which tween effect current frame use.
Bone* _bone |
Between frame data, used for calculate current FrameData(m_pNode) value.
var _bone |
Between frame data, used for calculate current FrameData(m_pNode) value.
local _bone |
Between frame data, used for calculate current FrameData(m_pNode) value.
CCTweenType _frameTweenEasing |
A weak reference to the Bone.
var _frameTweenEasing |
A weak reference to the Bone.
local _frameTweenEasing |
A weak reference to the Bone.
var _from |
The computational tween frame data, //! A weak reference to the Bone's tweenData.
local _from |
The computational tween frame data, //! A weak reference to the Bone's tweenData.
int _fromIndex |
var _fromIndex |
local _fromIndex |
|
protected |
A weak reference to the current MovementBoneData. The data is in the data pool.
FrameData* _to |
From frame data, used for calculate between value.
var _to |
From frame data, used for calculate between value.
local _to |
From frame data, used for calculate between value.
int _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
var _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
local _toIndex |
The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex.
int _totalDuration |
Current key frame will last _betweenDuration frames.
var _totalDuration |
Current key frame will last _betweenDuration frames.
local _totalDuration |
Current key frame will last _betweenDuration frames.
virtual MovementBoneData* getMovementBoneData (void)\n \n public FrameData* _tweenData |
getMovementBoneData
setMovementBoneData
var _tweenData |
getMovementBoneData
setMovementBoneData
local _tweenData |
getMovementBoneData
setMovementBoneData