Table of Contents

Method CreateTileset

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

CreateTileset(AsepriteFile, GraphicsDevice, int)

Creates a new Tileset from the frame at the specified index in provided aseprite file.

public static Tileset CreateTileset(this AsepriteFile aseFile, GraphicsDevice device, int frameIndex)

Parameters

aseFile AsepriteFile

The aseprite file instance.

device GraphicsDevice

The graphics device used to create graphical resources.

frameIndex int

The index of the frame that contains the tileset.

Returns

Tileset

The Tileset created by this method.

Exceptions

ArgumentNullException

Thrown if the aseFile parameter is null.

-or-

Throw if the frameIndex is less than zero or greater than or equal to the total number of frames in the aseprite file

-or-

Thrown if the device parameter is null.

CreateTileset(AsepriteFile, GraphicsDevice, string)

Creates a new Tileset with the specified name in provided aseprite file.

public static Tileset CreateTileset(this AsepriteFile aseFile, GraphicsDevice device, string tilesetName)

Parameters

aseFile AsepriteFile

The aseprite file instance.

device GraphicsDevice

The graphics device used to create graphical resources.

tilesetName string

The name of the tileset.

Returns

Tileset

The Tileset created by this method.

Exceptions

ArgumentNullException

Thrown if the aseFile parameter is null.

-or-

Thrown if the device parameter is null.

InvalidOperationException

Throw if no tileset with the specified tilesetName exists in the aseprite file.

CreateTileset(Tileset, GraphicsDevice)

Creates a new Tileset from the specified aseprite tileset.

public static Tileset CreateTileset(this Tileset aseTileset, GraphicsDevice device)

Parameters

aseTileset Tileset

The Aseprite tileset to create the tileset from..

device GraphicsDevice

The graphics device used to create graphical resources.

Returns

Tileset

The Tileset created by this method.

Exceptions

ArgumentNullException

Thrown if the aseTileset parameter is null.

-or-

Thrown if the device parameter is null.