s&box docs

public class Sandbox.Sprite.AnimationState

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

Constructors

Showing 1 constructors

Methods

Showing 2 methods

public void ResetState()

Reset the animation playback state to the beginning (first frame, no ping-pong, zero time-since).

public bool TryAdvanceFrame(Sandbox.Sprite.Animation animation, float deltaTime)

Try to advance the frame of a given animation with a given delta time. Returns false if the frame did not advance.

Properties

Showing 1 properties

public bool Sandbox.Sprite.AnimationState.JustFinished { get; set; }

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

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Sprite.AnimationState

On this page