Class AnimatedTilemap
Defines a AnimatedTilemap consisting of AnimatedTilemapFrame elements
public sealed class AnimatedTilemap : IEnumerable<AnimatedTilemapFrame>, IEnumerable
- Inheritance
-
AnimatedTilemap
- Implements
- Inherited Members
Constructors
- AnimatedTilemap(string, bool, bool, bool)
Initializes a new instance of the AnimatedTilemap class.
Properties
- CurrentFrame
Gets the source AnimatedTilemapFrame element for the current animation frame.
- CurrentFrameTimeRemaining
Gets the amount of time remaining for the CurrentFrame before moving to the next frame.
- IsAnimating
Gets a value that indicates if this AnimatedTilemap is currently animating.
- IsLooping
Gets a value that indicates whether the animation this AnimatedTilemap should loop.
- IsPaused
Gets a value that indicates if this AnimatedTilemap is currently paused.
- IsPingPong
Gets a value that indicates whether the animation for this AnimatedTilemap should ping-pong once reaching the last frame of animation.
- IsReversed
Gets a value that indicates whether the animation this AnimatedTilemap should play frames in reverse order.
- this[int]
Gets the AnimatedTilemapFrame element at the specified index in this AnimatedTilemap.
- Name
Gets the name assigned to this AnimatedTilemap.
- OnAnimationBegin
Gets or Sets an Action method to invoke at the start of the animation. This will trigger only once when the animation starts before the first frame's OnFrameBegin triggers.
- OnAnimationEnd
Gets or Sets an Action method to invoke when the animation ends. This will only trigger when the animation ends in a non-looping animation, or if a looping animation is stopped by calling the Stop() method manually.
- OnAnimationLoop
Gets or Sets an Action method to invoke each time the animation loops. This will trigger each time the animation loops after the last frame's OnFrameEnd triggers.
- OnFrameBegin
Gets or Sets an Action method to invoke at the start of each animation frame.
- OnFrameEnd
Gets or Sets an Action method to invoke at the end of each animation frame.
- frameCount
Gets the total number of AnimatedTilemapFrame elements in this AnimatedTilemap.
Methods
- AddFrame(AnimatedTilemapFrame)
Adds the given AnimatedTilemapFrame as the next frame of animation in this AnimatedTilemap.
- Clear()
Removes all AnimatedTilemapFrame elements from this AnimatedTilemap.
- CreateFrame(TimeSpan)
Creates and adds a new AnimatedTilemapFrame element as the next frame of animation in this AnimatedTilemap.
- Draw(SpriteBatch, Vector2, Color)
Draws this AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
- Draw(SpriteBatch, Vector2, Color, Vector2, float)
Draws this AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
- Draw(SpriteBatch, Vector2, Color, float, float)
Draws this AnimatedTilemap using the Microsoft.Xna.Framework.Graphics.SpriteBatch.
- GetEnumerator()
Returns an enumerator that iterates through the collection.
- GetFrame(int)
Gets the AnimatedTilemapFrame element at the specified index in this AnimatedTilemap.
- Pause(bool)
Pauses this AnimatedTilemap and prevents it from being updated until it is unpaused.
- RemoveFrame(int)
Removes the AnimatedTilemapFrame element at the specified index from this AnimatedTilemap.
- Reset(bool)
Resets this AnimatedTilemap back to its first frame of animation.
- Stop()
Stops this AnimatedTilemap on the CurrentFrame. This will trigger the OnAnimationEnd if one was set.
- TryGetFrame(int, out AnimatedTilemapFrame?)
Gets the AnimatedTilemapFrame element at the specified index in this AnimatedTilemap.
- Unpause(bool)
Unpauses this AnimatedTilemap.
- Update(GameTime)
Updates this AnimatedTilemap.
- Update(double)
Updates this AnimatedTilemap.
- Update(in TimeSpan)
Updates this AnimatedTilemap.