Table of Contents

Class AnimatedSprite

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

Defines an animated sprite with methods to control the playing of the sprite animation.

public sealed class AnimatedSprite : Sprite
Inheritance
AnimatedSprite
Inherited Members

Properties

CurrentFrame

Gets the source AnimationFrame of the current frame of animation for this
AnimatedSprite.

CurrentFrameTimeRemaining

Gets the amount of time remaining for the CurrentFrame before moving to the next frame.

FrameCount

Gets the total number of frames in this AnimatedSprite

IsAnimating

Gets a value that indicates if this AnimatedSprite has completed its animation.

IsPaused

Gets a value that indicates if this AnimatedSprite is currently paused.

IsPingPong

Gets or Sets a value that indicates if this AnimatedSprite should ping-pong once reaching the last frame of animation.

IsReversed

Gets or Sets a value that indicates if this AnimatedSprite plays it's frames in reverse order.

LoopCount

Gets a value that indicates the total number of loops/cycles of the animation that should play for this AnimatedSprite.

OnAnimationBegin

Gets or Sets an Action method to invoke at the start of the animation.

OnAnimationEnd

Gets or Sets an Action method to invoke when the animation ends.

OnAnimationLoop

Gets or Sets an Action to invoke each time the animation loops.

OnFrameBegin

Gets or Sets an Action method to invoke at the start of each frame of animation.

OnFrameEnd

Gets or Sets an Action method to invoke at the end of each frame of animation.

Speed

Sets the rate at which the animation is played.

Methods

Pause(bool)

Paused this AnimatedSprite and prevents it from being updated until it is unpaused.

Play(int?, int?)

Starts the animation for this AnimatedSprite

Reset()

Resets this AnimatedSprite back to its initial state as defined by the AnimationTag used to create it. You will need to call Play(int?, int?) after resetting to start the playback of the animation.

SetFrame(int)

Sets the current frame of animation for this AnimatedSprite.

Stop()

Stops this AnimatedSprite on the current frame.

Unpause(bool)

Unpaused this AnimatedSprite.

Update(GameTime)

Updates this AnimatedSprite.

Update(double)

Updates this AnimatedSprite.

Update(in TimeSpan)

Updates this AnimatedSprite.