The main animation structure. More...
#include <animation.h>
Public Attributes | |
| SDL_Texture * | spritesheet |
| Spritesheet texture. | |
| AnimationClip * | clips |
| Array of different animations. | |
| int | clipCount |
| Number of animation clips. | |
| Vec2 | frameSize |
| Size of each frame in the spritesheet. | |
| int | frameCount |
| Total number of frames in the spritesheet. | |
| int | currentClip |
| Currently active clip index. | |
| int | currentFrame |
| Current frame within the clip. | |
| float | timer |
| Time accumulator for frame changes. | |
| bool | isPlaying |
| Whether animation is playing. | |
| int | direction |
| 1 for forward, -1 for backward | |
The main animation structure.
| int Animation::clipCount |
Number of animation clips.
| AnimationClip* Animation::clips |
Array of different animations.
| int Animation::currentClip |
Currently active clip index.
| int Animation::currentFrame |
Current frame within the clip.
| int Animation::direction |
1 for forward, -1 for backward
| int Animation::frameCount |
Total number of frames in the spritesheet.
| Vec2 Animation::frameSize |
Size of each frame in the spritesheet.
| bool Animation::isPlaying |
Whether animation is playing.
| SDL_Texture* Animation::spritesheet |
Spritesheet texture.
| float Animation::timer |
Time accumulator for frame changes.