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

Repeats an action a number of times. More...

Inherits ActionInterval.

Public Member Functions

void setInnerAction (FiniteTimeAction *action)
 Sets the inner action. More...
 
FiniteTimeAction * getInnerAction ()
 Gets the inner action. More...
 
local getInnerAction ()
 Gets the inner action. More...
 
virtual Repeatclone () const override
 override Action.
 
var clone ()
 override Action.
 
local clone ()
 override Action.
 
virtual Repeatreverse () const override
 override Action.
 
var reverse ()
 override Action.
 
local reverse ()
 override Action.
 
virtual bool isDone (void) const override
 override Action.
 
local isDone ()
 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...
 

Static Public Member Functions

static Repeatcreate (FiniteTimeAction *action, unsigned int times)
 Creates a Repeat action. More...
 
var create ( var action, var times)
 Creates a Repeat action. More...
 
local create ( local action, local times)
 Creates a Repeat action. More...
 

Protected Member Functions

bool initWithAction (FiniteTimeAction *pAction, unsigned int times)
 initializes a Repeat action. More...
 
- 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

Repeats an action a number of times.

To repeat an action forever use the RepeatForever action.

Member Function Documentation

static Repeat* create ( FiniteTimeAction *  action,
unsigned int  times 
)
static

Creates a Repeat action.

Parameter times is an unsigned integer between 1 and pow(2,30).

The action needs to repeat. The repeat times. An autoreleased Repeat object.

var create ( var  action,
var  times 
)
static

Creates a Repeat action.

Parameter times is an unsigned integer between 1 and pow(2,30).

The action needs to repeat. The repeat times. An autoreleased Repeat object.

local create ( local  action,
local  times 
)
static

Creates a Repeat action.

Parameter times is an unsigned integer between 1 and pow(2,30).

The action needs to repeat. The repeat times. An autoreleased Repeat object.

void setInnerAction ( FiniteTimeAction *  action)
inline

Sets the inner action.

The inner action.

var setInnerAction ( var  action)
inline

Sets the inner action.

The inner action.

local setInnerAction ( local  action)
inline

Sets the inner action.

The inner action.

FiniteTimeAction* getInnerAction ( )
inline

Gets the inner action.

The inner action.

var getInnerAction ( )
inline

Gets the inner action.

The inner action.

local getInnerAction ( )
inline

Gets the inner action.

The inner action.

bool initWithAction ( FiniteTimeAction *  pAction,
unsigned int  times 
)
protected

initializes a Repeat action.

Times is an unsigned integer between 1 and pow(2,30) The action needs to repeat. The repeat times. Return true if initialized successfully, otherwise return false.

var initWithAction ( var  pAction,
var  times 
)
protected

initializes a Repeat action.

Times is an unsigned integer between 1 and pow(2,30) The action needs to repeat. The repeat times. Return true if initialized successfully, otherwise return false.

local initWithAction ( local  pAction,
local  times 
)
protected

initializes a Repeat action.

Times is an unsigned integer between 1 and pow(2,30) The action needs to repeat. The repeat times. Return true if initialized successfully, otherwise return false.


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