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
indexintThe index of the Tile element in this TilemapLayer to set.
tilesetTileIDintThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontallyboolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVerticallyboolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonallyboolIndicates 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
columnintThe column in this TilemapLayer to set the Tile element at.
rowintThe row in this TilemapLayer to set the Tile element at.
tilesetTileIDintThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontallyboolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVerticallyboolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonallyboolIndicates 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
locationPointThe column and row location in this TilemapLayer to set the Tile element at.
tilesetTileIDintThe ID of the source tile in the Tileset that represents the TextureRegion to render for the Tile element being set.
flipHorizontallyboolIndicates whether the Tile element being set should be flipped horizontally when rendered.
flipVerticallyboolIndicates if the Tile element being set should be flipped vertically when rendered.
flipDiagonallyboolIndicates 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
indexintThe index in this TilemapLayer to set.
tileTileThe 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
columnintThe column in this TilemapLayer to set.
rowintThe row in this TilemapLayer to set.
tileTileThe 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
locationPointThe column and row location in this TilemapLayer to set.
tileTileThe 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.