Function TileMap.setCell
Sets the tile index for the cell given by a Vector2.
An index of -1
clears the cell.
Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
Note: Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
If you need these to be immediately updated, you can call updateDirtyQuadrants
.
Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
void setCell
(
const(long) x,
const(long) y,
const(long) tile,
const(bool) flip_x = false,
const(bool) flip_y = false,
const(bool) transpose = false,
const(Vector2) autotile_coord = Vector2(0.00000F, , 0.00000F, , ) .this(0.00000F, 0.00000F)
) nothrow @nogc;
func set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord) # Write your custom logic here. # To call the default method: .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)