Table of Contents

Class Animation

Namespace
MonoEight.Core.Sprite
Assembly
MonoEight.Template.dll

A named animation sequence defined by an array of frame indices.

public class Animation
Inheritance
Animation
Inherited Members

Constructors

Animation(string, params int[])

A named animation sequence defined by an array of frame indices.

public Animation(string name, params int[] frames)

Parameters

name string

The unique name of the animation.

frames int[]

The indices of the frames in the SpriteSheet that make up the animation.

Properties

FrameDuration

Gets the duration of a single frame in seconds.

public float FrameDuration { get; init; }

Property Value

float

Remarks

The default is 0.05 seconds, ~20 fps.

Frames

Gets the array of indices.

public int[] Frames { get; }

Property Value

int[]

Loop

Whether the Animation should loop continuously.

public bool Loop { get; init; }

Property Value

bool

Remarks

Default is true.

Name

Gets the name of the Animation.

public string Name { get; }

Property Value

string