Table of Contents

Method SetTile

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

SetTile(int, int, bool, bool, bool)

Sets the Tile element at the specified index in this TilemapLayer using the values provided.

public void SetTile(int index, int tilesetTileID, bool flipHorizontally = false, bool flipVertically = false, bool flipDiagonally = false)

Parameters

index int

The index of the Tile element in this TilemapLayer to set.

tilesetTileID int

The ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.

flipHorizontally bool

Indicates whether the Tile element being set should be flipped horizontally when rendered.

flipVertically bool

Indicates if the Tile element being set should be flipped vertically when rendered.

flipDiagonally bool

Indicates if the Tile element being set should be flipped diagonally when rendered.

Exceptions

ArgumentOutOfRangeException

Thrown if the index specified is less than zero or is greater than or equal to the total number of Tile elements in this TilemapLayer.

SetTile(int, int, int, bool, bool, bool)

Sets the Tile element at the specified column and row in this TilemapLayer using the values provided.

public void SetTile(int column, int row, int tilesetTileID, bool flipHorizontally = false, bool flipVertically = false, bool flipDiagonally = false)

Parameters

column int

The column in this TilemapLayer to set the Tile element at.

row int

The row in this TilemapLayer to set the Tile element at.

tilesetTileID int

The ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.

flipHorizontally bool

Indicates whether the Tile element being set should be flipped horizontally when rendered.

flipVertically bool

Indicates if the Tile element being set should be flipped vertically when rendered.

flipDiagonally bool

Indicates if the Tile element being set should be flipped diagonally when rendered.

Exceptions

ArgumentOutOfRangeException

Thrown if either the column or row specified is less than zero or are greater than or equal to the total number of columns or rows in this TilemapLayer.

SetTile(Point, int, bool, bool, bool)

Sets the Tile element at the specified column and row location in this TilemapLayer using the values provided.

public void SetTile(Point location, int tilesetTileID, bool flipHorizontally = false, bool flipVertically = false, bool flipDiagonally = false)

Parameters

location Point

The column and row location in this TilemapLayer to set the Tile element at.

tilesetTileID int

The ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.

flipHorizontally bool

Indicates whether the Tile element being set should be flipped horizontally when rendered.

flipVertically bool

Indicates if the Tile element being set should be flipped vertically when rendered.

flipDiagonally bool

Indicates if the Tile element being set should be flipped diagonally when rendered.

Exceptions

ArgumentOutOfRangeException

Thrown if either the column or row in the specified location is less than zero or are greater than or equal to the total number of columns or rows in this TilemapLayer.

SetTile(int, Tile)

Sets the specified index in this TilemapLayer to the Tile element given.

public void SetTile(int index, Tile tile)

Parameters

index int

The index in this TilemapLayer to set.

tile Tile

The Tile element to set at the index.

Exceptions

ArgumentOutOfRangeException

Thrown if the index specified is less than zero or is greater than or equal to the total number of Tile elements in this TilemapLayer.

SetTile(int, int, Tile)

Sets the specified column and row in this TilemapLayer to the Tile element given.

public void SetTile(int column, int row, Tile tile)

Parameters

column int

The column in this TilemapLayer to set.

row int

The row in this TilemapLayer to set.

tile Tile

The Tile element to set at the column and row.

Exceptions

ArgumentOutOfRangeException

Thrown if either the column or row specified are less than zero or are greater than or equal to the total number of columns or rows in this TilemapLayer.

SetTile(Point, Tile)

Sets the specified column and row location in this TilemapLayer to the Tile element given.

public void SetTile(Point location, Tile tile)

Parameters

location Point

The column and row location in this TilemapLayer to set.

tile Tile

The Tile element to set at the column and row location.

Exceptions

ArgumentOutOfRangeException

Thrown if either the column or row in the specified location are less than zero or are greater than or equal to the total number of columns or rows in this TilemapLayer.