Phaser API Documentation

  Version: 
zone(x, y, width, height)

Description:

Creates a new Zone Game Object and adds it to the Scene.

Note: This method will only be available if the Zone Game Object has been built into Phaser.

Parameters:

name type description
x number

The horizontal position of this Game Object in the world.

y number

The vertical position of this Game Object in the world.

width number

The width of the Game Object.

height number

The height of the Game Object.

Returns:
Description:

The Game Object that was created.

Since: 3.0.0