Method CreateTileset
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
aseFileAsepriteFileThe aseprite file instance.
deviceGraphicsDeviceThe graphics device used to create graphical resources.
frameIndexintThe index of the frame that contains the tileset.
Returns
Exceptions
- ArgumentNullException
Thrown if the
aseFileparameter is null.-or-
Throw if the
frameIndexis less than zero or greater than or equal to the total number of frames in the aseprite file-or-
Thrown if the
deviceparameter 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
aseFileAsepriteFileThe aseprite file instance.
deviceGraphicsDeviceThe graphics device used to create graphical resources.
tilesetNamestringThe name of the tileset.
Returns
Exceptions
- ArgumentNullException
Thrown if the
aseFileparameter is null.-or-
Thrown if the
deviceparameter is null.- InvalidOperationException
Throw if no tileset with the specified
tilesetNameexists 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
aseTilesetTilesetThe Aseprite tileset to create the tileset from..
deviceGraphicsDeviceThe graphics device used to create graphical resources.
Returns
Exceptions
- ArgumentNullException
Thrown if the
aseTilesetparameter is null.-or-
Thrown if the
deviceparameter is null.