Sprite sheet animation played by changing the texture rectangle.
More...
#include <components/Animation.hpp>
|
|
float | frameDuration {0.1f} |
| | Time each frame stays visible, in seconds.
|
| |
|
float | elapsedTime {0.0f} |
| | Time spent on the current frame.
|
| |
|
uint16_t | currentFrame {0} |
| | Index of the visible frame.
|
| |
|
uint16_t | totalFrames {1} |
| | Number of frames in the animation.
|
| |
|
uint16_t | frameWidth {0} |
| | Frame width in the sheet, in pixels.
|
| |
|
uint16_t | frameHeight {0} |
| | Frame height in the sheet, in pixels.
|
| |
|
uint16_t | startX {0} |
| | X of the first frame in the sheet.
|
| |
|
uint16_t | startY {0} |
| | Y of the first frame in the sheet.
|
| |
|
uint16_t | columns {0} |
| | Frames per row, 0 for a single row.
|
| |
|
uint16_t | paddingX {0} |
| | Horizontal gap between frames.
|
| |
|
uint16_t | paddingY {0} |
| | Vertical gap between rows.
|
| |
|
bool | loop {true} |
| | Restarts after the last frame.
|
| |
|
bool | playing {true} |
| | Advances frames while true.
|
| |
|
bool | reverse {false} |
| | Plays the frames backwards.
|
| |
Sprite sheet animation played by changing the texture rectangle.