Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
ActionFloat Class Reference

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

#include <ActionInterval.h>

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
 Overridden ActionInterval methods.
 
- 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 ActionFloatcreate (float duration, float from, float to, ActionFloatCallback callback)
 Creates FloatAction with specified duration, from value, to value and callback to report back results.
 

Detailed Description

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

Member Function Documentation

◆ create()

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.

Parameters
durationof the action
fromvalue to start from
tovalue to be at the end of the action
callbackto report back result
Returns
An autoreleased ActionFloat object

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