Tilemap#hasTile()

hasTile(x, y, layer) → {boolean}

Checks if there is a tile at the given location.

Parameters
Name Type Description
x number

X position to check if a tile exists at (given in tile units, not pixels)

y number

Y position to check if a tile exists at (given in tile units, not pixels)

layer number | string | Phaser.TilemapLayer

The layer to set as current.

Returns
boolean -

True if there is a tile at the given location, otherwise false.

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

Please login to continue.