Phaser API Documentation

<static> SetLayerCollisionIndex(tileIndex, collides, layer)


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.


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.