Phaser API Documentation

  Version: 
removeTile(tiles, [replaceIndex], [recalculateFaces])

Description:

Removes the given Tile, or an array of Tiles, from the layer to which they belong, and optionally recalculates the collision information.

Parameters:

name type arguments Default description
tiles Phaser.Tilemaps.Tile | Array.<Phaser.Tilemaps.Tile>

The Tile to remove, or an array of Tiles.

replaceIndex number <optional> -1

After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile.

recalculateFaces boolean <optional> true

true if the faces data should be recalculated.

Returns:
Description:

Returns an array of Tiles that were removed.

Type:
Since: 3.17.0
Source: src/tilemaps/Tilemap.js (Line 1830)