Phaser API Documentation

  Version: 
getTileAt(tileX, tileY, [nonNull])

Description:

Gets a tile at the given tile coordinates from the given layer.

Parameters:

name type arguments Default description
tileX number

X position to get the tile from (given in tile units, not pixels).

tileY number

Y position to get the tile from (given in tile units, not pixels).

nonNull boolean <optional> false

If true getTile won't return null for empty tiles, but a Tile object with an index of -1.

Returns:
Description:

The Tile at the given coordinates or null if no tile was found or the coordinates were invalid.

Since: 3.50.0