TilemapLayer#getTiles()

getTiles(x, y, width, height, collides, interestingFace) → {array.<Phaser.Tile>}

Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

Parameters
Name Type Argument Default Description
x number

X position of the top left corner (in pixels).

y number

Y position of the top left corner (in pixels).

width number

Width of the area to get (in pixels).

height number

Height of the area to get (in pixels).

collides boolean <optional>
false

If true, only return tiles that collide on one or more faces.

interestingFace boolean <optional>
false

If true, only return tiles that have interesting faces.

Returns
array.<Phaser.Tile> -

An array of Tiles.

Source code: tilemap/TilemapLayer.js (Line 598)
doc_phaser
2017-02-14 11:16:06
Comments
Leave a Comment

Please login to continue.