Phaser API Documentation

  Version: 
<static> RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)

Description:

Removes the tile at the given world coordinates in the specified layer and updates the layer's collision information.

Parameters:

name type description
worldX number

The x coordinate, in pixels.

worldY number

The y coordinate, in pixels.

replaceWithNull boolean

If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.

recalculateFaces boolean

true if the faces data should be recalculated.

camera Phaser.Cameras.Scene2D.Camera

The Camera to use when calculating the tile index from the world values.

layer Phaser.Tilemaps.LayerData

The Tilemap Layer to act upon.

Returns:
Description:

The Tile object that was removed.