Phaser API Documentation

  Version: 
setCollision(left, [right], [up], [down], [recalculateFaces])

Description:

Sets the collision flags for each side of this tile and updates the interesting faces list.

Parameters:

name type arguments Default description
left boolean

Indicating collide with any object on the left.

right boolean <optional>

Indicating collide with any object on the right.

up boolean <optional>

Indicating collide with any object on the top.

down boolean <optional>

Indicating collide with any object on the bottom.

recalculateFaces boolean <optional> true

Whether or not to recalculate interesting faces for this tile and its neighbors.

Returns:
Description:

This Tile object instance.

Since: 3.0.0
Source: src/tilemaps/Tile.js (Line 634)