Axmol Engine 2.4.0-258ceca
|
An interval action is an action that takes place within a certain period of time. More...
#include <ActionInterval.h>
Inherited by AccelAmplitude, AccelDeccelAmplitude, ActionCamera, ActionEase, ActionFloat, ActionTween, Animate, Animate3D, BezierBy, Blink, CardinalSplineTo, DeccelAmplitude, DelayTime, FadeTo, GridAction, JumpBy, MoveBy, ProgressFromTo, ProgressTo, Repeat, RepeatForever, ResizeBy, ResizeTo, ReverseTime, RotateBy, RotateTo, ScaleTo, Sequence, SkewTo, Spawn, TargetedAction, TintBy, and TintTo.
Public Member Functions | |
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 | |
An interval action is an action that takes place within a certain period of time.
It has an start time, and a finish time. The finish time is the parameter duration plus the start time.
These ActionInterval actions have some interesting properties, like:
For example, you can simulate a Ping Pong effect running the action normally and then running it again in Reverse mode.
Example:
|
inline |
How many seconds had elapsed since the actions started to run.
void setAmplitudeRate | ( | float | amp | ) |
Sets the amplitude rate, extension in GridAction.
amp | The amplitude rate. |
float getAmplitudeRate | ( | ) |
Gets the amplitude rate, extension in GridAction.
|
overridevirtual |
dt | in seconds |
Reimplemented in Animate3D, and RepeatForever.