Phaser API Documentation

  Version: 
<static> SetLayerCollisionIndex(tileIndex, collides, layer)

Description:

Internally used method to keep track of the tile indexes that collide within a layer. This updates LayerData.collideIndexes to either contain or not contain the given tileIndex.

Parameters:

name type description
tileIndex number

The tile index to set the collision boolean for.

collides boolean

Should the tile index collide or not?

layer Phaser.Tilemaps.LayerData

The Tilemap Layer to act upon.