AnimationStateclass

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

object→AnimationState
Namespace
global
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Sprite.AnimationState

Constructors1

Showing 1 constructors

Methods2

Showing 2 methods

public void ResetState()PUBLIC

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

Returns:void—

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

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

ParameterTypeDescription
animationAnimation—
deltaTimefloat—
Returns:bool—

Properties1

Showing 1 properties

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

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

Returns:bool—

On this page