Summary

Contains the state of a sprite instance's animation playback.

Constructors

AnimationState

Fields

CurrentFrameIndex The current frame index in the animation.
IsPingPonging Whether or not the animation is currently ping-ponging. This is only relevant for animations that have Sandbox.Sprite.LoopMode.PingPong
PlaybackSpeed The speed at which the animation is playing back. A value of 1 means normal speed, 0.5 means half speed, and -1 means reverse playback.
TimeSinceLastFrame The time since the last frame was advanced.

Properties

JustFinished Returns true if the animation finished, looped, or ping-ponged after calling Sandbox.Sprite.AnimationState.TryAdvanceFrame(Sandbox.Sprite.Animation,System.Single)

Methods

ResetState Reset the animation playback state to the beginning (first frame, no ping-pong, zero time-since).
TryAdvanceFrame Try to advance the frame of a given animation with a given delta time. Returns false if the frame did not advance.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.