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

Overrides the target of an action so that it always runs on the target specified at action creation rather than the one specified by runAction. More...

Inherits ActionInterval.

Public Member Functions

void setForcedTarget (Node *forcedTarget)
 Sets the target that the action will be forced to run with. More...
 
NodegetForcedTarget ()
 returns the target that the action is forced to run with. More...
 
virtual TargetedActionclone () const override
 override ActionInterval.
 
var clone ()
 override ActionInterval.
 
local clone ()
 override ActionInterval.
 
virtual TargetedActionreverse () const override
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
var getElapsed ()
 How many seconds had elapsed since the actions started to run. More...
 
local getElapsed ()
 How many seconds had elapsed since the actions started to run. More...
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction. More...
 
float getAmplitudeRate (void)
 Gets the ampliture rate, extension in GridAction. More...
 
virtual bool isDone (void) const override
 override Action.
 
local isDone ()
 override Action.
 

Static Public Member Functions

static TargetedActioncreate (Node *target, FiniteTimeAction *action)
 Create an action with the specified action and forced target. More...
 
var create ( var target, var action)
 Create an action with the specified action and forced target. More...
 
local create ( local target, local action)
 Create an action with the specified action and forced target. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ActionInterval
bool initWithDuration (float d)
 initializes the action with the duration. More...
 
var initWithDuration ( var d)
 initializes the action with the duration. More...
 
local initWithDuration ( local d)
 initializes the action with the duration. More...
 

Detailed Description

Overrides the target of an action so that it always runs on the target specified at action creation rather than the one specified by runAction.

Member Function Documentation

static TargetedAction* create ( Node target,
FiniteTimeAction *  action 
)
static

Create an action with the specified action and forced target.

The target. The action. An autoreleased TargetedAction object.

var create ( var  target,
var  action 
)
static

Create an action with the specified action and forced target.

The target. The action. An autoreleased TargetedAction object.

local create ( local  target,
local  action 
)
static

Create an action with the specified action and forced target.

The target. The action. An autoreleased TargetedAction object.

void setForcedTarget ( Node forcedTarget)

Sets the target that the action will be forced to run with.

The target that the action will be forced to run with.

var setForcedTarget ( var  forcedTarget)

Sets the target that the action will be forced to run with.

The target that the action will be forced to run with.

local setForcedTarget ( local  forcedTarget)

Sets the target that the action will be forced to run with.

The target that the action will be forced to run with.

Node* getForcedTarget ( )
inline

returns the target that the action is forced to run with.

The target that the action is forced to run with.

var getForcedTarget ( )
inline

returns the target that the action is forced to run with.

The target that the action is forced to run with.

local getForcedTarget ( )
inline

returns the target that the action is forced to run with.

The target that the action is forced to run with.


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