Class Animation
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
namestringThe unique name of the animation.
framesint[]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
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
Remarks
Default is true.
Name
Gets the name of the Animation.
public string Name { get; }