Inherits ActionInterval.
Public Member Functions | |
ActionTween * | reverse () const override |
override Action . | |
ActionTween * | clone () const override |
override Action . | |
![]() | |
float | getElapsed (void) |
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 . | |
Static Public Member Functions | |
static ActionTween * | create (float duration, const std::string &key, float from, float to) |
Create and initializes the action with the property name (key), and the from and to parameters. More... | |
Protected Member Functions | |
bool | initWithDuration (float duration, const std::string &key, float from, float to) |
Initializes the action with the property name (key), and the from and to parameters. More... | |
![]() | |
bool | initWithDuration (float d) |
initializes the action with the duration. More... | |
ActionTween is an action that lets you update any property of an object. For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then:
Another example: ScaleTo action could be rewritten using PropertyAction:
|
static |
Create and initializes the action with the property name (key), and the from and to parameters.
The duration of the ActionTween. It's a value in seconds. The key of property which should be updated. The value of the specified property when the action begin. The value of the specified property when the action end. If the creation success, return a pointer of ActionTween; otherwise, return nil.
|
protected |
Initializes the action with the property name (key), and the from and to parameters.
The duration of the ActionTween. It's a value in seconds. The key of property which should be updated. The value of the specified property when the action begin. The value of the specified property when the action end. If the initialization success, return true; otherwise, return false.