Phaser API Documentation

  Version: 
enableBody([reset], [x], [y], [enableGameObject], [showGameObject])

Description:

Enables this Game Object's Body. If you reset the Body you must also pass x and y.

Parameters:

name type arguments description
reset boolean <optional>

Also reset the Body and place the Game Object at (x, y).

x number <optional>

The horizontal position to place the Game Object, if reset is true.

y number <optional>

The horizontal position to place the Game Object, if reset is true.

enableGameObject boolean <optional>

Also set this Game Object's active to true.

showGameObject boolean <optional>

Also set this Game Object's visible to true.

Returns:
Description:

This Game Object.

Since: 3.0.0