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
aseFile
AsepriteFileThe aseprite file instance.
device
GraphicsDeviceThe graphics device used to create graphical resources.
frameIndex
intThe index of the frame that contains the tileset.
Returns
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
AsepriteFileThe aseprite file instance.
device
GraphicsDeviceThe graphics device used to create graphical resources.
tilesetName
stringThe name of the tileset.
Returns
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
TilesetThe Aseprite tileset to create the tileset from..
device
GraphicsDeviceThe graphics device used to create graphical resources.
Returns
Exceptions
- ArgumentNullException
Thrown if the
aseTileset
parameter is null.-or-
Thrown if the
device
parameter is null.