Tilemap#paste()

paste(x, y, tileblock, layer)

Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.

Parameters
Name Type Argument Description
x number

X position of the top left of the area to paste to (given in tiles, not pixels)

y number

Y position of the top left of the area to paste to (given in tiles, not pixels)

tileblock array

The block of tiles to paste.

layer number | string | Phaser.TilemapLayer <optional>

The layer to paste the tiles into.

Source code: tilemap/Tilemap.js (Line 1605)
doc_phaser
2017-02-14 11:15:26
Comments
Leave a Comment

Please login to continue.