|
cocos2d-x
3.3
|
Base class for Action objects. More...
#include <CCAction.h>
Public Member Functions | |
| virtual std::string | description () const |
| NA NA More... | |
| 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. 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) |
| virtual | ~Action () |
Public Member Functions inherited from Ref | |
| 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 () |
| NA NA More... | |
Public Member Functions inherited from Clonable | |
| virtual | ~Clonable () |
| NA NA More... | |
| 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... | |
Protected Attributes inherited from Ref | |
| unsigned int | _referenceCount |
| count of references More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Ref | |
| Ref () | |
| Constructor. More... | |
Base class for Action objects.
|
virtual |
|
inlinevirtual |
returns a clone of action
Implements Clonable.
Reimplemented in TargetedAction, Animate, ReverseTime, EaseCubicActionInOut, DelayTime, EaseCubicActionOut, EaseCubicActionIn, TintBy, EaseCircleActionInOut, TintTo, EaseCircleActionOut, FadeOut, EaseCircleActionIn, FadeIn, EaseQuinticActionInOut, EaseQuinticActionOut, FadeTo, EaseQuinticActionIn, Blink, EaseQuarticActionInOut, ScaleBy, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, ScaleTo, EaseQuadraticActionOut, BezierTo, EaseQuadraticActionIn, EaseBezierAction, BezierBy, EaseBackInOut, JumpTo, EaseBackOut, EaseBackIn, JumpBy, EaseBounceInOut, SkewBy, EaseBounceOut, SkewTo, EaseBounceIn, MoveTo, EaseBounce, __CCCallFuncO, EaseElasticInOut, MoveBy, EaseElasticOut, __CCCallFuncND, RotateBy, EaseElasticIn, CallFuncN, SplitCols, RotateTo, EaseElastic, SplitRows, EaseSineInOut, Twirl, Spawn, ReuseGrid, CallFunc, JumpTiles3D, EaseSineOut, StopGrid, Waves, CatmullRomBy, CCBEaseInstant, EaseSineIn, WavesTiles3D, DeccelAmplitude, CCBRotateYTo, Follow, CatmullRomTo, RepeatForever, EaseExponentialInOut, Place, Liquid, CCBRotateXTo, TurnOffTiles, EaseExponentialOut, AccelAmplitude, CardinalSplineBy, CCBRotateTo, FlipY, Shaky3D, FadeOutDownTiles, Speed, EaseExponentialIn, CCBSoundEffect, Repeat, AccelDeccelAmplitude, FadeOutUpTiles, FlipX, CardinalSplineTo, Ripple3D, CCBSetSpriteFrame, EaseInOut, TiledGrid3DAction, FadeOutBLTiles, EaseOut, FiniteTimeAction, RemoveSelf, Sequence, FadeOutTRTiles, ActionTimeline, Lens3D, EaseIn, ToggleVisibility, Grid3DAction, FlipY3D, ShuffleTiles, Hide, OrbitCamera, EaseRateAction, ActionInterval, FlipX3D, ProgressFromTo, Show, ActionTween, LuaCallFunc, Animate3D, ShatteredTiles3D, ActionCamera, Waves3D, PageTurn3D, ActionEase, GridAction, ActionInstant, ProgressTo, and ShakyTiles3D.
|
virtual |
NA NA
|
inline |
|
inline |
|
inline |
|
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, EaseCubicActionInOut, DelayTime, EaseCubicActionOut, EaseCubicActionIn, TintBy, EaseCircleActionInOut, TintTo, EaseCircleActionOut, FadeOut, EaseCircleActionIn, FadeIn, EaseQuinticActionInOut, EaseQuinticActionOut, FadeTo, EaseQuinticActionIn, Blink, EaseQuarticActionInOut, ScaleBy, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, ScaleTo, EaseQuadraticActionOut, BezierTo, EaseQuadraticActionIn, EaseBezierAction, BezierBy, EaseBackInOut, JumpTo, EaseBackOut, EaseBackIn, JumpBy, EaseBounceInOut, SkewBy, EaseBounceOut, SkewTo, EaseBounceIn, EaseBounce, EaseElasticInOut, MoveBy, EaseElasticOut, RotateBy, EaseElasticIn, RotateTo, EaseElastic, EaseSineInOut, Spawn, ReuseGrid, CallFunc, EaseSineOut, StopGrid, CatmullRomBy, CCBEaseInstant, EaseSineIn, DeccelAmplitude, CCBRotateYTo, Follow, CatmullRomTo, RepeatForever, EaseExponentialInOut, Place, CCBRotateXTo, EaseExponentialOut, AccelAmplitude, CardinalSplineBy, CCBRotateTo, FlipY, Speed, EaseExponentialIn, CCBSoundEffect, Repeat, AccelDeccelAmplitude, CardinalSplineTo, FlipX, CCBSetSpriteFrame, EaseInOut, EaseOut, RemoveSelf, FiniteTimeAction, Sequence, ActionTimeline, EaseIn, ToggleVisibility, Hide, EaseRateAction, ProgressFromTo, ActionInterval, Show, ActionTween, Animate3D, ActionCamera, ActionEase, ActionInstant, 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, AccelAmplitude, CCBRotateTo, CardinalSplineBy, Speed, Repeat, AccelDeccelAmplitude, CardinalSplineTo, Sequence, ActionTimeline, ShuffleTiles, OrbitCamera, ProgressFromTo, ActionInterval, ActionTween, Animate3D, ActionEase, ActionCamera, GridAction, and ProgressTo.
|
virtual |
called every frame with it's delta time. DON'T override unless you know what you are doing.
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, Animate3D, and ActionEase.
|
virtual |
called once per frame.
time a value between 0 and 1
For example:
Reimplemented in TargetedAction, Animate, ReverseTime, EaseCubicActionInOut, DelayTime, EaseCubicActionOut, TintBy, EaseCubicActionIn, EaseCircleActionInOut, TintTo, EaseCircleActionOut, EaseCircleActionIn, EaseQuinticActionInOut, EaseQuinticActionOut, FadeTo, EaseQuinticActionIn, Blink, EaseQuarticActionInOut, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, ScaleTo, EaseQuadraticActionOut, EaseQuadraticActionIn, EaseBezierAction, BezierBy, EaseBackInOut, EaseBackOut, EaseBackIn, JumpBy, EaseBounceInOut, EaseBounceOut, SkewTo, EaseBounceIn, MoveBy, EaseElasticInOut, EaseElasticOut, RotateBy, EaseElasticIn, SplitCols, RotateTo, SplitRows, Spawn, Twirl, EaseSineInOut, JumpTiles3D, CallFunc, EaseSineOut, Waves, CCBEaseInstant, WavesTiles3D, EaseSineIn, CCBRotateYTo, DeccelAmplitude, EaseExponentialInOut, Liquid, Place, CCBRotateXTo, TurnOffTiles, EaseExponentialOut, AccelAmplitude, CCBRotateTo, FlipY, Shaky3D, EaseExponentialIn, CCBSoundEffect, Repeat, AccelDeccelAmplitude, CardinalSplineTo, FlipX, Ripple3D, CCBSetSpriteFrame, EaseInOut, EaseOut, RemoveSelf, Sequence, FadeOutTRTiles, Lens3D, EaseIn, ToggleVisibility, FlipY3D, ShuffleTiles, OrbitCamera, Hide, ProgressFromTo, FlipX3D, Show, Animate3D, ActionTween, ShatteredTiles3D, ActionEase, ActionInstant, Waves3D, 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.