Base class for Action objects. More...
#include <CCAction.h>
Public Member Functions | |
virtual std::string | description () const |
virtual Action * | clone () const |
Returns a clone of action. More... | |
virtual Action * | reverse () const |
Returns a new action that performs the exactly the reverse action. More... | |
virtual bool | isDone () const |
Return true if the action has finished. More... | |
virtual void | startWithTarget (Node *target) |
Called before the action start. More... | |
virtual void | stop () |
Called after the action has finished. More... | |
virtual void | step (float dt) |
Called every frame with it's delta time, dt in seconds. More... | |
virtual void | update (float time) |
Called once per frame. More... | |
Node * | getTarget () const |
Return certain target. More... | |
void | setTarget (Node *target) |
The action will modify the target properties. More... | |
Node * | getOriginalTarget () const |
Return a original Target. More... | |
void | setOriginalTarget (Node *originalTarget) |
Set the original target, since target can be nil. More... | |
int | getTag () const |
Returns a tag that is used to identify the action easily. More... | |
void | setTag (int tag) |
Changes the tag that is used to identify the action easily. More... | |
virtual | ~Action () |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
![]() | |
virtual | ~Clonable () |
Ref * | copy () const |
Returns a copy of the Ref. More... | |
Public Attributes | |
CC_CONSTRUCTOR_ACCESS | __pad0__: Action() |
Static Public Attributes | |
static const int | INVALID_TAG = -1 |
Default tag used for all the actions. More... | |
Protected Attributes | |
Node * | _originalTarget |
Node * | _target |
The "target". More... | |
int | _tag |
The action tag. More... | |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
Additional Inherited Members | |
![]() | |
Ref () | |
Constructor. More... | |
Base class for Action objects.
|
virtual |
|
inlinevirtual |
Returns a clone of action.
Implements Clonable.
Reimplemented in TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, EaseCubicActionInOut, FadeOut, EaseCubicActionOut, EaseCubicActionIn, FadeIn, EaseCircleActionInOut, FadeTo, EaseCircleActionOut, EaseCircleActionIn, Blink, EaseQuinticActionInOut, ScaleBy, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, ScaleTo, EaseQuarticActionOut, EaseQuarticActionIn, BezierTo, EaseQuadraticActionInOut, EaseQuadraticActionOut, BezierBy, EaseQuadraticActionIn, EaseBezierAction, JumpTo, EaseBackInOut, JumpBy, EaseBackOut, SkewBy, EaseBackIn, EaseBounceInOut, SkewTo, EaseBounceOut, MoveTo, EaseBounceIn, EaseBounce, MoveBy, EaseElasticInOut, Twirl, SplitCols, EaseElasticOut, RotateBy, SplitRows, __CCCallFuncO, EaseElasticIn, Waves, JumpTiles3D, __CCCallFuncND, RotateTo, EaseElastic, CallFuncN, Liquid, WavesTiles3D, EaseSineInOut, ReuseGrid, Spawn, EaseSineOut, StopGrid, CallFunc, Shaky3D, TurnOffTiles, EaseSineIn, DeccelAmplitude, CatmullRomBy, Follow, EaseExponentialInOut, RepeatForever, Ripple3D, FadeOutDownTiles, CatmullRomTo, Place, AccelAmplitude, EaseExponentialOut, FadeOutUpTiles, CCBEaseInstant, CardinalSplineBy, Speed, FlipY, EaseExponentialIn, CCBRotateYTo, FadeOutBLTiles, Repeat, AccelDeccelAmplitude, CCBRotateXTo, EaseInOut, FadeOutTRTiles, Lens3D, FlipX, CardinalSplineTo, CCBRotateTo, TiledGrid3DAction, CCBSoundEffect, FiniteTimeAction, EaseOut, RemoveSelf, CCBSetSpriteFrame, Sequence, EaseIn, FlipY3D, ActionTimeline, ShuffleTiles, ToggleVisibility, OrbitCamera, Grid3DAction, Hide, FlipX3D, EaseRateAction, ShatteredTiles3D, ActionInterval, ProgressFromTo, LuaCallFunc, ActionTween, Show, Waves3D, Animate3D, PageTurn3D, ActionCamera, ActionEase, GridAction, ProgressTo, ShakyTiles3D, and ActionInstant.
|
virtual |
|
inline |
Return a original Target.
|
inline |
Returns a tag that is used to identify the action easily.
|
inline |
Return certain target.
|
virtual |
Return true if the action has finished.
Reimplemented in Follow, RepeatForever, Speed, Repeat, ActionTimeline, ActionInterval, and ActionInstant.
|
inlinevirtual |
Returns a new action that performs the exactly the reverse action.
Reimplemented in TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, EaseCubicActionInOut, FadeOut, EaseCubicActionOut, EaseCubicActionIn, FadeIn, EaseCircleActionInOut, FadeTo, EaseCircleActionOut, EaseCircleActionIn, Blink, EaseQuinticActionInOut, ScaleBy, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, ScaleTo, EaseQuarticActionOut, EaseQuarticActionIn, BezierTo, EaseQuadraticActionInOut, EaseQuadraticActionOut, BezierBy, EaseQuadraticActionIn, EaseBezierAction, JumpTo, EaseBackInOut, JumpBy, EaseBackOut, SkewBy, EaseBackIn, EaseBounceInOut, SkewTo, EaseBounceOut, MoveTo, EaseBounceIn, EaseBounce, MoveBy, EaseElasticInOut, EaseElasticOut, RotateBy, EaseElasticIn, RotateTo, EaseElastic, EaseSineInOut, ReuseGrid, Spawn, EaseSineOut, StopGrid, CallFunc, EaseSineIn, DeccelAmplitude, CatmullRomBy, Follow, EaseExponentialInOut, RepeatForever, CatmullRomTo, Place, AccelAmplitude, EaseExponentialOut, CCBEaseInstant, CardinalSplineBy, Speed, FlipY, EaseExponentialIn, CCBRotateYTo, Repeat, AccelDeccelAmplitude, CCBRotateXTo, EaseInOut, CardinalSplineTo, FlipX, CCBRotateTo, CCBSoundEffect, EaseOut, FiniteTimeAction, RemoveSelf, CCBSetSpriteFrame, Sequence, ActionTimeline, EaseIn, ToggleVisibility, Hide, EaseRateAction, ProgressFromTo, ActionTween, ActionInterval, Show, Animate3D, ActionEase, GridAction, ActionCamera, ProgressTo, and ActionInstant.
|
inline |
Set the original target, since target can be nil.
Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method. The target is 'assigned', it is not 'retained'.
originalTarget | Is 'assigned', it is not 'retained'. |
|
inline |
Changes the tag that is used to identify the action easily.
tag | Used to identify the action easily. |
|
inline |
The action will modify the target properties.
target | A certain target. |
|
virtual |
Called before the action start.
It will also set the target.
target | A certain target. |
Reimplemented in TargetedAction, Animate, ReverseTime, TintBy, TintTo, FadeOut, FadeIn, FadeTo, Blink, ScaleBy, ScaleTo, BezierTo, BezierBy, JumpTo, JumpBy, SkewBy, SkewTo, MoveTo, MoveBy, SplitCols, RotateBy, SplitRows, RotateTo, ReuseGrid, Spawn, StopGrid, TurnOffTiles, DeccelAmplitude, RepeatForever, AccelAmplitude, CardinalSplineBy, Speed, CCBRotateYTo, Repeat, AccelDeccelAmplitude, CCBRotateXTo, CardinalSplineTo, CCBRotateTo, Sequence, ActionTimeline, ShuffleTiles, OrbitCamera, ProgressFromTo, ActionTween, ActionInterval, Animate3D, ActionEase, GridAction, ActionCamera, and ProgressTo.
|
virtual |
Called every frame with it's delta time, dt in seconds.
DON'T override unless you know what you are doing.
dt | In seconds. |
Reimplemented in Follow, RepeatForever, Speed, ActionTimeline, ActionInterval, Animate3D, and ActionInstant.
|
virtual |
Called after the action has finished.
It will set the 'target' to nil. IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);".
Reimplemented in TargetedAction, Animate, ReverseTime, Blink, Spawn, Follow, Speed, Repeat, Sequence, ActionEase, and Animate3D.
|
virtual |
Called once per frame.
time a value between 0 and 1.
For example:
time | A value between 0 and 1. |
Reimplemented in TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, EaseCubicActionInOut, EaseCubicActionOut, EaseCubicActionIn, EaseCircleActionInOut, FadeTo, EaseCircleActionOut, EaseCircleActionIn, Blink, EaseQuinticActionInOut, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, ScaleTo, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, EaseQuadraticActionOut, BezierBy, EaseQuadraticActionIn, EaseBezierAction, EaseBackInOut, JumpBy, EaseBackOut, EaseBackIn, EaseBounceInOut, SkewTo, EaseBounceOut, EaseBounceIn, MoveBy, EaseElasticInOut, Twirl, SplitCols, EaseElasticOut, RotateBy, SplitRows, EaseElasticIn, Waves, JumpTiles3D, RotateTo, Liquid, WavesTiles3D, Spawn, EaseSineInOut, EaseSineOut, CallFunc, Shaky3D, TurnOffTiles, EaseSineIn, DeccelAmplitude, EaseExponentialInOut, Ripple3D, Place, AccelAmplitude, EaseExponentialOut, CCBEaseInstant, FlipY, CCBRotateYTo, EaseExponentialIn, Repeat, CCBRotateXTo, AccelDeccelAmplitude, CardinalSplineTo, EaseInOut, Lens3D, FadeOutTRTiles, FlipX, CCBRotateTo, CCBSoundEffect, EaseOut, Sequence, RemoveSelf, CCBSetSpriteFrame, EaseIn, FlipY3D, ShuffleTiles, ToggleVisibility, OrbitCamera, FlipX3D, Hide, ProgressFromTo, ShatteredTiles3D, ActionTween, Show, Waves3D, Animate3D, ActionEase, ActionInstant, PageTurn3D, ProgressTo, and ShakyTiles3D.
CC_CONSTRUCTOR_ACCESS __pad0__ |
|
protected |
|
protected |
The action tag.
An identifier of the action.
|
protected |
The "target".
The target will be set with the 'startWithTarget' method. When the 'stop' method is called, target will be set to nil. The target is 'assigned', it is not 'retained'.
|
static |
Default tag used for all the actions.