Animationclass

Contains one or multiple frames that can be played in sequence.

objectAnimation
Namespace
global
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Sprite.Animation

Constructors1

Showing 1 constructors

Properties10

Showing 10 properties

public int Sandbox.Sprite.Animation.EffectiveLoopEnd { get; set; }PUBLICGETSET

Returns the effective loop end frame index, resolving -1 to the last frame.

Returns:int

public int Sandbox.Sprite.Animation.EffectiveLoopStart { get; set; }PUBLICGETSET

Returns the effective loop start frame index, resolving -1 to 0.

Returns:int

public float Sandbox.Sprite.Animation.FrameRate { get; set; }PUBLICGETSET

The speed of the animation in frames per second.

Returns:float

public System.Collections.Generic.List`1<Sandbox.Sprite.Frame> Sandbox.Sprite.Animation.Frames { get; set; }PUBLICGETSET

A list of frames that make up the animation. Each frame is a texture that will be displayed in sequence.

Returns:List<Frame>

public bool Sandbox.Sprite.Animation.IsAnimated { get; set; }PUBLICGETSET

True if we have more than one frame

Returns:bool

public int Sandbox.Sprite.Animation.LoopEnd { get; set; }PUBLICGETSET

The frame index at which looping ends. A value of -1 means the last frame.

Returns:int

public Sandbox.Sprite.LoopMode Sandbox.Sprite.Animation.LoopMode { get; set; }PUBLICGETSET

The loop mode of the animation. This determines what should happen when the animation reaches the final frame in playback.

Returns:LoopMode

public int Sandbox.Sprite.Animation.LoopStart { get; set; }PUBLICGETSET

The frame index at which looping starts. A value of -1 means the first frame (0).

Returns:int

public string Sandbox.Sprite.Animation.Name { get; set; }PUBLICGETSET

The name of the animation. Allows you to play specific animations by name.

Returns:string

public Vector2 Sandbox.Sprite.Animation.Origin { get; set; }PUBLICGETSET

The point at which the rendered sprite is anchored from. This means scaling/rotating a sprite will do so around the origin.

Returns:Vector2

On this page