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

Action used to animate any value in range [from,to] over specified time interval. More...

Inherits ActionInterval.

Public Types

typedef std::function< void(float
value)> 
ActionFloatCallback
 Callback function used to report back result.
 

Public Member Functions

void startWithTarget (Node *target) override
 override ActionInterval.
 
local startWithTarget ( local target)
 override ActionInterval.
 
ActionFloatreverse () const override
 override Action.
 
var reverse ()
 override Action.
 
local reverse ()
 override Action.
 
ActionFloatclone () const override
 override Action.
 
local clone ()
 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 ActionFloatcreate (float duration, float from, float to, ActionFloatCallback callback)
 Creates FloatAction with specified duration, from value, to value and callback to report back results Duration time, in seconds. 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

Action used to animate any value in range [from,to] over specified time interval.

Member Function Documentation

static ActionFloat* create ( float  duration,
float  from,
float  to,
ActionFloatCallback  callback 
)
static

Creates FloatAction with specified duration, from value, to value and callback to report back results Duration time, in seconds.

value to start from value to be at the end of the action Callback to report back result An autoreleased ActionFloat object

var create ( var  duration,
var  from,
var  to,
var  callback 
)
static

Creates FloatAction with specified duration, from value, to value and callback to report back results Duration time, in seconds.

value to start from value to be at the end of the action Callback to report back result An autoreleased ActionFloat object

local create ( local  duration,
local  from,
local  to,
local  callback 
)
static

Creates FloatAction with specified duration, from value, to value and callback to report back results Duration time, in seconds.

value to start from value to be at the end of the action Callback to report back result An autoreleased ActionFloat object


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