World#setBounds()

setBounds(x, y, width, height)

Updates the size of this world and sets World.x/y to the given values
The Camera bounds and Physics bounds (if set) are also updated to match the new World bounds.

Parameters
Name Type Description
x number

Top left most corner of the world.

y number

Top left most corner of the world.

width number

New width of the game world in pixels.

height number

New height of the game world in pixels.

Source code: core/World.js (Line 94)
doc_phaser
2017-02-14 11:21:49
Comments
Leave a Comment

Please login to continue.