Method CreateSprite
CreateSprite(AsepriteFile, GraphicsDevice, int, ProcessorOptions?)
Creates a new Sprite from the specified frame index of the provided aseprite file instance.
public static Sprite CreateSprite(this AsepriteFile aseFile, GraphicsDevice device, int frameIndex, ProcessorOptions? options = null)
Parameters
aseFile
AsepriteFileThe aseprite file instance.
device
GraphicsDeviceThe graphics device used to create graphical resources.
frameIndex
intThe index of the frame in the aseprite file to create the sprite from.
options
ProcessorOptionsThe options to use when processing the sprite.
Returns
Exceptions
- ArgumentNullException
Thrown if the
aseFile
parameter is null.-or-
Thrown if the
device
parameter is null.- ArgumentOutOfRangeException
Thrown if
frameIndex
is less than zero or greater than or equal to the total number of frames in the aseprite file.