Phaser API Documentation

  Version: 
updateWall(add, [position], [x], [y], [width], [height])

Description:

Updates the 4 rectangle bodies that were created, if setBounds was set in the Matter config, to use the new positions and sizes. This method is usually only called internally via the setBounds method.

Parameters:

name type arguments description
add boolean

true if the walls are being added or updated, false to remove them from the world.

position string <optional>

Either left, right, top or bottom. Only optional if add is false.

x number <optional>

The horizontal position to place the walls at. Only optional if add is false.

y number <optional>

The vertical position to place the walls at. Only optional if add is false.

width number <optional>

The width of the walls, in pixels. Only optional if add is false.

height number <optional>

The height of the walls, in pixels. Only optional if add is false.

Since: 3.0.0