Animation
Namespace: MonineEngine.Graphics.Animations
Container for animation data, such as the frames in the animation and the delay between them.
public class Animation
Inheritance Object → Animation
Attributes NullableContextAttribute, NullableAttribute
Fields
Frames
The texture regions that make up the frames of the animation.
public List<TextureRegion> Frames;
Remarks:
The order of the regions in the list is the order of the frames when playing the animation.
Delay
The amount of time to delay between each animation frame before moving to the next animation frame.
public TimeSpan Delay;
Loops
If true, the animation will reset back to the beginning upon finishing the animation. If false, it will freeze upon reaching the end.
public bool Loops;
Constructors
Animation()
Constructs a new animation with empty frames and 100ms of delay.
public Animation()
Animation(List<TextureRegion>, TimeSpan, Boolean)
Constructs a new animation with the given frames and delay.
public Animation(List<TextureRegion> frames, TimeSpan delay, bool loops)
Parameters
frames List<TextureRegion>
The texture regions that make up this animation.
delay TimeSpan
The amount of time to delay between each animation frame.
loops Boolean
Whether the animation should loop upon finishing.