Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
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...

#include <ActionInterval.h>

Inherits ActionInterval.

Public Member Functions

void setForcedTarget (Node *forcedTarget)
 Sets the target that the action will be forced to run with.
 
NodegetForcedTarget ()
 returns the target that the action is forced to run with.
 
virtual void update (float time) override
 
bool initWithTarget (Node *target, FiniteTimeAction *action)
 Init an action with the specified action and forced target.
 
- Public Member Functions inherited from ActionInterval
float getElapsed ()
 How many seconds had elapsed since the actions started to run.
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction.
 
float getAmplitudeRate ()
 Gets the amplitude rate, extension in GridAction.
 
virtual void step (float dt) override
 
bool initWithDuration (float d)
 initializes the action
 

Static Public Member Functions

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

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

◆ create()

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

Create an action with the specified action and forced target.

Parameters
targetThe target needs to override.
actionThe action needs to override.
Returns
An autoreleased TargetedAction object.

◆ setForcedTarget()

void setForcedTarget ( Node * forcedTarget)

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

Parameters
forcedTargetThe target that the action will be forced to run with.

◆ getForcedTarget()

Node * getForcedTarget ( )
inline

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

Returns
The target that the action is forced to run with.

◆ update()

virtual void update ( float time)
overridevirtual
Parameters
timeIn seconds.

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