Tilemap#putTileWorldXY()

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)
doc_phaser
2017-02-14 11:15:28
Comments
Leave a Comment

Please login to continue.