putTileWorldXY(tile, x, y, tileWidth, tileHeight, layer) → {Phaser.Tile}
Puts a tile into the Tilemap layer. The coordinates are given in pixel values.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
tile | Phaser.Tile | number | The index of this tile to set or a Phaser.Tile object. | |
x | number | X position to insert the tile (given in pixels) | |
y | number | Y position to insert the tile (given in pixels) | |
tileWidth | number | The width of the tile in pixels. | |
tileHeight | number | The height of the tile in 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 1386)
Please login to continue.