Phaser API Documentation

  Version: 
hasTileAt(tileX, tileY)

Description:

Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns false if there is no tile or if the tile at that location has an index of -1.

Parameters:

name type description
tileX number

The x coordinate, in tiles, not pixels.

tileY number

The y coordinate, in tiles, not pixels.

Returns:
Description:

true if a tile was found at the given location, otherwise false.

Type:
  • boolean
Since: 3.50.0