putTile(tile, x, y, layer) → {Phaser.Tile}
Puts a tile of the given index value at the coordinate specified.
If you pass null
as the tile it will pass your call over to Tilemap.removeTile instead.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
tile | Phaser.Tile | number | null | The index of this tile to set or a Phaser.Tile object. If null the tile is removed from the map. | |
x | number | X position to place the tile (given in tile units, not pixels) | |
y | number | Y position to place the tile (given in tile units, not pixels) | |
layer | number | string | Phaser.TilemapLayer | <optional> | The layer to modify. |
Returns
The Tile object that was created or added to this map.
- Source code: tilemap/Tilemap.js (Line 1315)
Please login to continue.