SpriteAnimation¶
Inherits: Action
C++ type: SpriteAnimation
Description¶
Cycles through a sequence of texture atlas frames on its target Sprite, creating flip-book-style 2D animation. This is distinct from skeletal animation (Animation); SpriteAnimation only advances the active frame of a sprite sheet.
Methods¶
| Type | Name | Langs |
|---|---|---|
| void | setAnimation | C++ | Lua |
Method details¶
setAnimation¶
- void setAnimation(std::vector\<int> frames, std::vector\<int> framesTime, bool loop)
- void setAnimation(int startFrame, int endFrame, int interval, bool loop)
Configure the frame sequence.
First overload — explicit frame list with per-frame durations in milliseconds:
Second overload — range-based with a fixed interval (milliseconds per frame):