A single instance of an SPA animation. It's instanced like this so that the same animation can be played back multiple times at once; the instance keeps track of which frame the animation is currently at.
Public Member Functions | |
SPAInstance (SPA animation) | |
Creates a new playable instance of the given SPA animation. More... | |
void | Update () |
Advances the animation. Different animations may be at different frame rates, so this regulates the frame rate too. More... | |
void | Stop () |
Stops this instance. If you continue to display it after this is called, the animation will appear frozen on the last frame. More... | |
Public Attributes | |
bool | Done |
True if the animation is over. More... | |
int | AtFrame |
Which frame ID we're up to in the current sprite. More... | |
SPA | Animation |
The animation this instance belongs to. More... | |
bool | Loop =true |
True if this animation should loop. More... | |
int | OverallFrame |
The frame ID in the overall animation. More... | |
float | FrameDelay |
How long to wait before advancing the frame, in seconds. More... | |
float | CurrentDelay |
How long we've waited so far since the frame was last advanced. More... | |
SPASprite | CurrentSprite |
The current sprite we're using. Contains the graphic itself. More... | |
Material | AnimatedMaterial |
The material this instance is using. More... | |
SPAInstance | InstanceAfter |
Currently playing instances are stored in a linked list. This is the instance in the list after this one. PowerUI.SPA.FirstInstance More... | |
SPAInstance | InstanceBefore |
Currently playing instances are stored in a linked list. This is theinstance in the list before this one. PowerUI.SPA.FirstInstance More... | |
Private Member Functions | |
void | SetSprite (int index) |
Sets the sprite with the given ID as the active one. More... | |
|
inline |
Creates a new playable instance of the given SPA animation.
|
inlineprivate |
Sets the sprite with the given ID as the active one.
index | The ID of the sprite. |
|
inline |
Stops this instance. If you continue to display it after this is called, the animation will appear frozen on the last frame.
|
inline |
Advances the animation. Different animations may be at different frame rates, so this regulates the frame rate too.
Material PowerUI.SPAInstance.AnimatedMaterial |
The material this instance is using.
SPA PowerUI.SPAInstance.Animation |
The animation this instance belongs to.
int PowerUI.SPAInstance.AtFrame |
Which frame ID we're up to in the current sprite.
float PowerUI.SPAInstance.CurrentDelay |
How long we've waited so far since the frame was last advanced.
SPASprite PowerUI.SPAInstance.CurrentSprite |
The current sprite we're using. Contains the graphic itself.
bool PowerUI.SPAInstance.Done |
True if the animation is over.
float PowerUI.SPAInstance.FrameDelay |
How long to wait before advancing the frame, in seconds.
SPAInstance PowerUI.SPAInstance.InstanceAfter |
Currently playing instances are stored in a linked list. This is the instance in the list after this one. PowerUI.SPA.FirstInstance
SPAInstance PowerUI.SPAInstance.InstanceBefore |
Currently playing instances are stored in a linked list. This is theinstance in the list before this one. PowerUI.SPA.FirstInstance
bool PowerUI.SPAInstance.Loop =true |
True if this animation should loop.
int PowerUI.SPAInstance.OverallFrame |
The frame ID in the overall animation.