Table of Contents

Class SpriteSheet

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

Defines a spritesheet with a source TextureAtlas and methods for creating Sprite and AnimatedSprite elements.

public sealed class SpriteSheet
Inheritance
SpriteSheet
Inherited Members

Constructors

SpriteSheet(string, TextureAtlas)

Initializes a new instance of the SpriteSheet class.

Properties

AnimationTagCount

Gets the total number of AnimationTag elements that have been defined for this SpriteSheet.

Name

Gets the name assigned to this SpriteSheet.

TextureAtlas

Gets the source TextureAtlas of this SpriteSheet.

Methods

ContainsAnimationTag(string)

Returns a value that indicates whether this SpriteSheet contains an AnimationTag with the specified name.

CreateAnimatedSprite(string)

Creates a new AnimatedSprite using the AnimationTag element with the specified name in this SpriteSheet.

CreateAnimationTag(string, Action<AnimationTagBuilder>)

Creates a new AnimationTag and adds it to this SpriteSheet.

CreateSprite(int)

Creates a new Sprite from the TextureRegion at the specified index in the TextureAtlas of this SpriteSheet.

CreateSprite(string)

Creates a new Sprite from the TextureRegion at the specified index in the TextureAtlas of this SpriteSheet.

CreateSprite(string, int)

Creates a new Sprite from the TextureRegion at the specified index in the TextureAtlas of this SpriteSheet.

CreateSprite(string, string)

Creates a new Sprite from the TextureRegion at the specified index in the TextureAtlas of this SpriteSheet.

GetAnimationTag(string)

Gets the AnimationTag element with the specified name in this SpriteSheet.

GetAnimationTagNames()

Returns a new List<T> containing the name of all AnimationTag elements that have been defined in this SpriteSheet.

RemoveAnimationTag(string)

Removes the AnimationTag element with the specified name from this SpriteSheet.

TryGetAnimationTag(string, out AnimationTag?)

Gets the AnimationTag element with the specified name in this SpriteSheet.