Add an animation to the sprite. The animation can either be multiple images or parts of a spritesheet.
View on GitHub
add animation (name) (pattern) (frames)
Name |
Data Type |
Description |
name |
String |
Name of the animation |
pattern |
String |
A pattern for finding images representing the frames. |
frames |
int |
The number of frames for this animation. |
width |
int |
The width of one frame. Only needed when loading from a spritesheet. |
height |
int |
The height of one frame. Only needed when loading from a spritesheet. |
row |
int |
The row in a spritesheet. Only needed when loading from a spritesheet. |
void