Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Action Class Reference

Base class for Action objects. More...

Inherits Ref, and Clonable.

Inherited by FiniteTimeAction, Follow, and Speed.

Public Member Functions

virtual Actionclone () const
 Returns a clone of action. More...
 
var clone ()
 Returns a clone of action. More...
 
local clone ()
 Returns a clone of action. More...
 
virtual Actionreverse () const
 Returns a new action that performs the exactly the reverse action. More...
 
local reverse ()
 Returns a new action that performs the exactly the reverse action. More...
 
virtual bool isDone () const
 Return true if the action has finished. More...
 
var isDone ()
 Return true if the action has finished. More...
 
local isDone ()
 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 that has finished. More...
 
virtual void step (float dt)
 Called every frame with its delta time, dt in seconds. More...
 
local step ( local dt)
 Called every frame with its delta time, dt in seconds. More...
 
virtual void update (float time)
 Called once per frame. More...
 
var update ( var time)
 Called once per frame. More...
 
local update ( local time)
 Called once per frame. More...
 
NodegetTarget () const
 Return the current target. More...
 
void setTarget (Node *target)
 The setter function for the target property. More...
 
var setTarget ( var target)
 The setter function for the target property. More...
 
local setTarget ( local target)
 The setter function for the target property. More...
 
NodegetOriginalTarget () const
 Return the original Target. More...
 
var getOriginalTarget ()
 Return the original Target. More...
 
local getOriginalTarget ()
 Return the original Target. More...
 
void setOriginalTarget (Node *originalTarget)
 Set the original target, since target can be nil. More...
 
var setOriginalTarget ( var originalTarget)
 Set the original target, since target can be nil. More...
 
local setOriginalTarget ( local 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...
 
var getTag ()
 Returns a tag that is used to identify the action easily. More...
 
local getTag ()
 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...
 
var setTag ( var tag)
 Changes the tag that is used to identify the action easily. More...
 
local setTag ( local tag)
 Changes the tag that is used to identify the action easily. More...
 
unsigned int getFlags () const
 Returns a flag field that is used to group the actions easily. More...
 
void setFlags (unsigned int flags)
 Returns a flag field that is used to group the actions easily. More...
 
var setFlags ( var flags)
 Returns a flag field that is used to group the actions easily. More...
 
local setFlags ( local flags)
 Returns a flag field that is used to group the actions easily. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 
- Public Member Functions inherited from Clonable
Refcopy () const
 Returns a copy of the Ref.
 

Static Public Attributes

static const int INVALID_TAG = -1
 Default tag used for all the actions.
 
var INVALID_TAG = -1
 Default tag used for all the actions.
 
local INVALID_TAG = -1
 Default tag used for all the actions.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

Base class for Action objects.

Member Function Documentation

virtual Action* clone ( ) const
inlinevirtual

Returns a clone of action.

A clone action.

Implements Clonable.

Reimplemented in ActionFloat, TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, FadeOut, FadeIn, FadeTo, EaseCubicActionInOut, EaseCubicActionOut, Blink, EaseCubicActionIn, ScaleBy, EaseCircleActionInOut, EaseCircleActionOut, EaseCircleActionIn, EaseQuinticActionInOut, ScaleTo, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, BezierTo, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, BezierBy, EaseQuadraticActionOut, JumpTo, EaseQuadraticActionIn, EaseBezierAction, JumpBy, EaseBackInOut, SkewBy, EaseBackOut, SkewTo, EaseBackIn, MoveTo, EaseBounceInOut, EaseBounceOut, MoveBy, EaseBounceIn, Twirl, SplitCols, EaseBounce, EaseElasticInOut, RotateBy, SplitRows, EaseElasticOut, Waves, JumpTiles3D, EaseElasticIn, RotateTo, Liquid, WavesTiles3D, EaseElastic, Spawn, EaseSineInOut, ReuseGrid, Follow, Shaky3D, CallFuncN, EaseSineOut, TurnOffTiles, StopGrid, EaseSineIn, CatmullRomBy, DeccelAmplitude, Ripple3D, RepeatForever, CallFunc, EaseExponentialInOut, FadeOutDownTiles, Speed, CatmullRomTo, AccelAmplitude, FadeOutUpTiles, EaseExponentialOut, CardinalSplineBy, FadeOutBLTiles, EaseExponentialIn, Repeat, Place, FiniteTimeAction, AccelDeccelAmplitude, FadeOutTRTiles, Lens3D, EaseInOut, CardinalSplineTo, FlipY, TiledGrid3DAction, EaseOut, Sequence, FlipX, FlipY3D, EaseIn, ShuffleTiles, RemoveSelf, OrbitCamera, Grid3DAction, ToggleVisibility, FlipX3D, EaseRateAction, ActionInterval, ShatteredTiles3D, Animate3D, ActionTween, Hide, LuaCallFunc, ProgressFromTo, Waves3D, Show, PageTurn3D, ShakyTiles3D, ActionCamera, ProgressTo, ActionEase, GridAction, and ActionInstant.

var clone ( )
inlinevirtual

Returns a clone of action.

A clone action.

Implements Clonable.

Reimplemented in ActionFloat, TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, FadeOut, FadeIn, FadeTo, EaseCubicActionInOut, EaseCubicActionOut, Blink, EaseCubicActionIn, ScaleBy, EaseCircleActionInOut, EaseCircleActionOut, EaseCircleActionIn, EaseQuinticActionInOut, ScaleTo, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, BezierTo, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, BezierBy, EaseQuadraticActionOut, JumpTo, EaseQuadraticActionIn, EaseBezierAction, JumpBy, EaseBackInOut, SkewBy, EaseBackOut, SkewTo, EaseBackIn, MoveTo, EaseBounceInOut, EaseBounceOut, MoveBy, EaseBounceIn, Twirl, SplitCols, EaseBounce, EaseElasticInOut, RotateBy, SplitRows, EaseElasticOut, Waves, JumpTiles3D, EaseElasticIn, RotateTo, Liquid, WavesTiles3D, EaseElastic, Spawn, EaseSineInOut, ReuseGrid, Follow, Shaky3D, CallFuncN, EaseSineOut, TurnOffTiles, StopGrid, EaseSineIn, CatmullRomBy, DeccelAmplitude, Ripple3D, RepeatForever, CallFunc, EaseExponentialInOut, FadeOutDownTiles, Speed, CatmullRomTo, AccelAmplitude, FadeOutUpTiles, EaseExponentialOut, CardinalSplineBy, FadeOutBLTiles, EaseExponentialIn, Repeat, Place, FiniteTimeAction, AccelDeccelAmplitude, FadeOutTRTiles, Lens3D, EaseInOut, CardinalSplineTo, FlipY, TiledGrid3DAction, EaseOut, Sequence, FlipX, FlipY3D, EaseIn, ShuffleTiles, RemoveSelf, OrbitCamera, Grid3DAction, ToggleVisibility, FlipX3D, EaseRateAction, ActionInterval, ShatteredTiles3D, Animate3D, ActionTween, Hide, LuaCallFunc, ProgressFromTo, Waves3D, Show, PageTurn3D, ShakyTiles3D, ActionCamera, ProgressTo, ActionEase, GridAction, and ActionInstant.

local clone ( )
inlinevirtual

Returns a clone of action.

A clone action.

Implements Clonable.

Reimplemented in ActionFloat, TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, FadeOut, FadeIn, FadeTo, EaseCubicActionInOut, EaseCubicActionOut, Blink, EaseCubicActionIn, ScaleBy, EaseCircleActionInOut, EaseCircleActionOut, EaseCircleActionIn, EaseQuinticActionInOut, ScaleTo, EaseQuinticActionOut, EaseQuinticActionIn, EaseQuarticActionInOut, BezierTo, EaseQuarticActionOut, EaseQuarticActionIn, EaseQuadraticActionInOut, BezierBy, EaseQuadraticActionOut, JumpTo, EaseQuadraticActionIn, EaseBezierAction, JumpBy, EaseBackInOut, SkewBy, EaseBackOut, SkewTo, EaseBackIn, MoveTo, EaseBounceInOut, EaseBounceOut, MoveBy, EaseBounceIn, Twirl, SplitCols, EaseBounce, EaseElasticInOut, RotateBy, SplitRows, EaseElasticOut, Waves, JumpTiles3D, EaseElasticIn, RotateTo, Liquid, WavesTiles3D, EaseElastic, Spawn, EaseSineInOut, ReuseGrid, Follow, Shaky3D, CallFuncN, EaseSineOut, TurnOffTiles, StopGrid, EaseSineIn, CatmullRomBy, DeccelAmplitude, Ripple3D, RepeatForever, CallFunc, EaseExponentialInOut, FadeOutDownTiles, Speed, CatmullRomTo, AccelAmplitude, FadeOutUpTiles, EaseExponentialOut, CardinalSplineBy, FadeOutBLTiles, EaseExponentialIn, Repeat, Place, FiniteTimeAction, AccelDeccelAmplitude, FadeOutTRTiles, Lens3D, EaseInOut, CardinalSplineTo, FlipY, TiledGrid3DAction, EaseOut, Sequence, FlipX, FlipY3D, EaseIn, ShuffleTiles, RemoveSelf, OrbitCamera, Grid3DAction, ToggleVisibility, FlipX3D, EaseRateAction, ActionInterval, ShatteredTiles3D, Animate3D, ActionTween, Hide, LuaCallFunc, ProgressFromTo, Waves3D, Show, PageTurn3D, ShakyTiles3D, ActionCamera, ProgressTo, ActionEase, GridAction, and ActionInstant.

virtual bool isDone ( ) const
virtual

Return true if the action has finished.

Is true if the action has finished.

Reimplemented in TargetedAction, Follow, RepeatForever, Speed, Repeat, ActionInterval, and ActionInstant.

var isDone ( )
virtual

Return true if the action has finished.

Is true if the action has finished.

Reimplemented in TargetedAction, Follow, RepeatForever, Speed, Repeat, ActionInterval, and ActionInstant.

local isDone ( )
virtual

Return true if the action has finished.

Is true if the action has finished.

Reimplemented in TargetedAction, Follow, RepeatForever, Speed, Repeat, ActionInterval, and ActionInstant.

virtual void stop ( )
virtual

Called after the action that 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.

var stop ( )
virtual

Called after the action that 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.

local stop ( )
virtual

Called after the action that 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 void step ( float  dt)
virtual

Called every frame with its delta time, dt in seconds.

DON'T override unless you know what you are doing.

In seconds.

Reimplemented in Follow, RepeatForever, Speed, Animate3D, ActionInterval, and ActionInstant.

var step ( var  dt)
virtual

Called every frame with its delta time, dt in seconds.

DON'T override unless you know what you are doing.

In seconds.

Reimplemented in Follow, RepeatForever, Speed, Animate3D, ActionInterval, and ActionInstant.

local step ( local  dt)
virtual

Called every frame with its delta time, dt in seconds.

DON'T override unless you know what you are doing.

In seconds.

Reimplemented in Follow, RepeatForever, Speed, Animate3D, ActionInterval, and ActionInstant.

virtual void update ( float  time)
virtual
var update ( var  time)
virtual
local update ( local  time)
virtual
Node* getTarget ( ) const
inline

Return the current target.

the current target.

var getTarget ( )
inline

Return the current target.

the current target.

local getTarget ( )
inline

Return the current target.

the current target.

void setTarget ( Node target)
inline

The setter function for the target property.

A certain target.

var setTarget ( var  target)
inline

The setter function for the target property.

A certain target.

local setTarget ( local  target)
inline

The setter function for the target property.

A certain target.

Node* getOriginalTarget ( ) const
inline

Return the original Target.

The original Target.

var getOriginalTarget ( )
inline

Return the original Target.

The original Target.

local getOriginalTarget ( )
inline

Return the original Target.

The original Target.

void setOriginalTarget ( Node originalTarget)
inline

Set the original target, since target can be nil.

The original target 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'. Is 'assigned', it is not 'retained'.

var setOriginalTarget ( var  originalTarget)
inline

Set the original target, since target can be nil.

The original target 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'. Is 'assigned', it is not 'retained'.

local setOriginalTarget ( local  originalTarget)
inline

Set the original target, since target can be nil.

The original target 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'. Is 'assigned', it is not 'retained'.

int getTag ( ) const
inline

Returns a tag that is used to identify the action easily.

A tag.

var getTag ( )
inline

Returns a tag that is used to identify the action easily.

A tag.

local getTag ( )
inline

Returns a tag that is used to identify the action easily.

A tag.

void setTag ( int  tag)
inline

Changes the tag that is used to identify the action easily.

Used to identify the action easily.

var setTag ( var  tag)
inline

Changes the tag that is used to identify the action easily.

Used to identify the action easily.

local setTag ( local  tag)
inline

Changes the tag that is used to identify the action easily.

Used to identify the action easily.

unsigned int getFlags ( ) const
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions

var getFlags ( )
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions

local getFlags ( )
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions

void setFlags ( unsigned int  flags)
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions

var setFlags ( var  flags)
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions

local setFlags ( local  flags)
inline

Returns a flag field that is used to group the actions easily.

A tag for group actions


The documentation for this class was generated from the following file: