Table of Contents

Method CreateLayer

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

CreateLayer(string, Tileset, int, int, Vector2)

Creates a new TilemapLayer element and adds it to this AnimatedTilemapFrame.

public TilemapLayer CreateLayer(string layerName, Tileset tileset, int columns, int rows, Vector2 offset)

Parameters

layerName string

The name to assign the TilemapLayer element created by this method. The name must be unique across all TilemapLayer elements in this AnimatedTilemapFrame.

tileset Tileset

The source Tileset to assign the TilemapLayer element created by this method.

columns int

The total number of columns to assign the TilemapLayer element created by this method.

rows int

The total of rows in the TilemapLayer element created by this method.

offset Vector2

The x- and y-position offset, relative to the location the AnimatedTilemap is rendered, to assign the TilemapLayer element created by this method.

Returns

TilemapLayer

The TilemapLayer created by this method.

Exceptions

InvalidOperationException

Thrown if this AnimatedTilemapFrame already contains a TilemapLayer element with the specified name.