Method SetTile
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
intThe index of the Tile element in this TilemapLayer to set.
tilesetTileID
intThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontally
boolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVertically
boolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonally
boolIndicates 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
intThe column in this TilemapLayer to set the Tile element at.
row
intThe row in this TilemapLayer to set the Tile element at.
tilesetTileID
intThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontally
boolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVertically
boolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonally
boolIndicates 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
PointThe column and row location in this TilemapLayer to set the Tile element at.
tilesetTileID
intThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontally
boolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVertically
boolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonally
boolIndicates 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
intThe index in this TilemapLayer to set.
tile
TileThe 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
intThe column in this TilemapLayer to set.
row
intThe row in this TilemapLayer to set.
tile
TileThe 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
PointThe column and row location in this TilemapLayer to set.
tile
TileThe 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.