Base class for Action objects. More...
#include <CCAction.h>
Public Member Functions | |
virtual std::string | description () const |
virtual Action * | clone () const =0 |
returns a clone of action More... | |
virtual Action * | reverse () const =0 |
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. It will also set the target. More... | |
virtual void | stop () |
called after the action has finished. More... | |
virtual void | step (float dt) |
called every frame with it's delta time. DON'T override unless you know what you are doing. More... | |
virtual void | update (float time) |
called once per frame. More... | |
Node * | getTarget () const |
void | setTarget (Node *target) |
The action will modify the target properties. More... | |
Node * | getOriginalTarget () const |
void | setOriginalTarget (Node *originalTarget) |
Set the original target, since target can be nil. More... | |
int | getTag () const |
void | setTag (int tag) |
![]() | |
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 () |
![]() | |
virtual | ~Clonable () |
Ref * | copy () const |
returns a copy of the Ref. More... | |
Static Public Attributes | |
static const int | INVALID_TAG = -1 |
Default tag used for all the actions. More... | |
Protected Member Functions | |
Action () | |
virtual | ~Action () |
![]() | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
Node * | _originalTarget |
Node * | _target |
The "target". More... | |
int | _tag |
The action tag. More... | |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
Base class for Action objects.
|
protected |
|
protectedvirtual |
|
pure virtual |
returns a clone of action
Implements Clonable.
Implemented in TargetedAction, Animate, ReverseTime, DelayTime, EaseCubicActionInOut, EaseCubicActionOut, TintBy, EaseCubicActionIn, TintTo, EaseCircleActionInOut, FadeOut, EaseCircleActionOut, EaseCircleActionIn, FadeIn, EaseQuinticActionInOut, FadeTo, EaseQuinticActionOut, EaseQuinticActionIn, Blink, EaseQuarticActionInOut, ScaleBy, EaseQuarticActionOut, EaseQuarticActionIn, ScaleTo, EaseQuadraticActionInOut, BezierTo, EaseQuadraticActionOut, EaseQuadraticActionIn, BezierBy, EaseBezierAction, JumpTo, EaseBackInOut, EaseBackOut, JumpBy, EaseBackIn, SkewBy, EaseBounceInOut, SkewTo, EaseBounceOut, EaseBounceIn, MoveTo, __CCCallFuncO, EaseBounce, MoveBy, EaseElasticInOut, __CCCallFuncND, EaseElasticOut, RotateBy, CallFuncN, SplitCols, EaseElasticIn, RotateTo, SplitRows, EaseElastic, Twirl, JumpTiles3D, Spawn, CallFunc, EaseSineInOut, ReuseGrid, EaseSineOut, Waves, StopGrid, CatmullRomBy, WavesTiles3D, CCBEaseInstant, CCBRotateYTo, EaseSineIn, CatmullRomTo, DeccelAmplitude, Liquid, Place, RepeatForever, CCBRotateXTo, Follow, TurnOffTiles, EaseExponentialInOut, CardinalSplineBy, CCBRotateTo, AccelAmplitude, Shaky3D, FlipY, FadeOutDownTiles, EaseExponentialOut, CCBSoundEffect, FadeOutUpTiles, Speed, EaseExponentialIn, CardinalSplineTo, Repeat, Ripple3D, CCBSetSpriteFrame, AccelDeccelAmplitude, FlipX, FadeOutBLTiles, EaseInOut, TiledGrid3DAction, RemoveSelf, FadeOutTRTiles, FiniteTimeAction, EaseOut, Lens3D, Sequence, ToggleVisibility, EaseIn, Grid3DAction, FlipY3D, ShuffleTiles, OrbitCamera, Hide, EaseRateAction, FlipX3D, ProgressFromTo, ActionInterval, ActionTween, LuaCallFunc, Show, ShatteredTiles3D, ActionCamera, Waves3D, ActionInstant, PageTurn3D, ActionEase, GridAction, ProgressTo, and ShakyTiles3D.
|
virtual |
|
inline |
|
inline |
|
inline |
|
virtual |
return true if the action has finished
Reimplemented in RepeatForever, Follow, Speed, Repeat, ActionInterval, and ActionInstant.
|
pure virtual |
returns a new action that performs the exactly the reverse action
Implemented in TargetedAction, Animate, ReverseTime, DelayTime, EaseCubicActionInOut, EaseCubicActionOut, TintBy, EaseCubicActionIn, TintTo, EaseCircleActionInOut, FadeOut, EaseCircleActionOut, EaseCircleActionIn, FadeIn, EaseQuinticActionInOut, FadeTo, EaseQuinticActionOut, EaseQuinticActionIn, Blink, EaseQuarticActionInOut, ScaleBy, EaseQuarticActionOut, EaseQuarticActionIn, ScaleTo, EaseQuadraticActionInOut, BezierTo, EaseQuadraticActionOut, EaseQuadraticActionIn, BezierBy, EaseBezierAction, JumpTo, EaseBackInOut, EaseBackOut, JumpBy, EaseBackIn, SkewBy, EaseBounceInOut, SkewTo, EaseBounceOut, EaseBounceIn, EaseBounce, MoveBy, EaseElasticInOut, EaseElasticOut, RotateBy, EaseElasticIn, RotateTo, EaseElastic, Spawn, EaseSineInOut, CallFunc, ReuseGrid, EaseSineOut, StopGrid, CatmullRomBy, CCBEaseInstant, CCBRotateYTo, EaseSineIn, CatmullRomTo, DeccelAmplitude, Place, RepeatForever, CCBRotateXTo, Follow, EaseExponentialInOut, CardinalSplineBy, CCBRotateTo, AccelAmplitude, EaseExponentialOut, FlipY, CCBSoundEffect, Speed, EaseExponentialIn, CardinalSplineTo, Repeat, CCBSetSpriteFrame, AccelDeccelAmplitude, FlipX, EaseInOut, RemoveSelf, FiniteTimeAction, EaseOut, Sequence, ToggleVisibility, EaseIn, Hide, EaseRateAction, ProgressFromTo, ActionInterval, ActionTween, Show, ActionCamera, ActionInstant, ActionEase, GridAction, and ProgressTo.
|
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'.
|
inline |
|
inline |
The action will modify the target properties.
|
virtual |
called before the action start. It will also set the target.
Reimplemented in TargetedAction, Animate, ReverseTime, TintBy, TintTo, FadeOut, FadeIn, FadeTo, Blink, ScaleBy, ScaleTo, BezierTo, BezierBy, JumpTo, JumpBy, SkewBy, SkewTo, MoveTo, MoveBy, RotateBy, SplitCols, RotateTo, SplitRows, Spawn, ReuseGrid, StopGrid, CCBRotateYTo, DeccelAmplitude, RepeatForever, TurnOffTiles, CCBRotateXTo, CCBRotateTo, CardinalSplineBy, AccelAmplitude, Speed, CardinalSplineTo, Repeat, AccelDeccelAmplitude, Sequence, ShuffleTiles, OrbitCamera, ProgressFromTo, ActionInterval, ActionTween, ActionCamera, ActionEase, GridAction, and ProgressTo.
|
virtual |
called every frame with it's delta time. DON'T override unless you know what you are doing.
Reimplemented in RepeatForever, Follow, Speed, ActionInterval, 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, and ActionEase.
|
virtual |
called once per frame.
time a value between 0 and 1
For example:
Reimplemented in TargetedAction, Animate, ReverseTime, DelayTime, EaseCubicActionInOut, EaseCubicActionOut, TintBy, EaseCubicActionIn, TintTo, EaseCircleActionInOut, EaseCircleActionOut, EaseCircleActionIn, EaseQuinticActionInOut, FadeTo, EaseQuinticActionOut, Blink, EaseQuinticActionIn, EaseQuarticActionInOut, EaseQuarticActionOut, EaseQuarticActionIn, ScaleTo, EaseQuadraticActionInOut, EaseQuadraticActionOut, EaseQuadraticActionIn, BezierBy, EaseBezierAction, EaseBackInOut, EaseBackOut, JumpBy, EaseBackIn, EaseBounceInOut, SkewTo, EaseBounceOut, EaseBounceIn, MoveBy, EaseElasticInOut, EaseElasticOut, RotateBy, SplitCols, EaseElasticIn, RotateTo, SplitRows, Twirl, JumpTiles3D, Spawn, CallFunc, EaseSineInOut, Waves, EaseSineOut, CCBEaseInstant, WavesTiles3D, CCBRotateYTo, EaseSineIn, Liquid, DeccelAmplitude, CCBRotateXTo, Place, TurnOffTiles, EaseExponentialInOut, CCBRotateTo, Shaky3D, AccelAmplitude, FlipY, EaseExponentialOut, CCBSoundEffect, CardinalSplineTo, Repeat, EaseExponentialIn, Ripple3D, CCBSetSpriteFrame, AccelDeccelAmplitude, FlipX, EaseInOut, RemoveSelf, FadeOutTRTiles, Lens3D, EaseOut, Sequence, ToggleVisibility, EaseIn, FlipY3D, ShuffleTiles, OrbitCamera, Hide, ProgressFromTo, FlipX3D, ActionTween, Show, ShatteredTiles3D, Waves3D, ActionInstant, ActionEase, PageTurn3D, ProgressTo, and ShakyTiles3D.
|
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.