phaser - v4.0.0-rc.4
    Preparing search index...
    • Sets collision on the given tile or tiles within a layer by index. You can pass in either a single numeric index or an array of indexes: [2, 3, 15, 20]. The collides parameter controls if collision will be enabled (true) or disabled (false).

      Parameters

      • indexes: number | any[]

        Either a single tile index, or an array of tile indexes.

      • collides: boolean

        If true it will enable collision. If false it will clear collision.

      • recalculateFaces: boolean

        Whether or not to recalculate the tile faces after the update.

      • layer: LayerData

        The Tilemap Layer to act upon.

      • OptionalupdateLayer: boolean

        If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true.

      Returns void