The action library is used to create actions that can be run by nodes. These actions can change the nodes properties over time, e.g., position, rotation, animating a sprite. The actions can be chained together to form sequences or run in parallel.
| action | The action library is used to create actions that can be run by nodes. |
| Functions | |
| action. | Creates an action to rotate a Node. |
| action. | Create an action that causes the target Node to change its x-coordinate to a new value in some time interval. |
| action. | Create an action that causes the target Node to move along a given Path. |
| action. | Create an action that animates a Sprite. |
| action. | Exectues an action repeatedly. |
Creates an action to rotate a Node.
| angle | The angle by which to rotate the target Node |
| duration | The duration of the action |
The created Action.
Create an action that causes the target Node to move along a given Path.
| path | A Path object that the target Node will follow |
| duration | The duration of the action |
| asOffset | An optional boolean indicating whether or not the path is offset from the Node location (default false) |
| orientToPath | An optional boolean indicating whether or not the Node turns with the path (default false) |
Create an action that animates a Sprite.
| textures | One or more textures to be used as the frames of the animation. |
| frameDuration | The duration of each frame in seconds. |