World#shutdown()

shutdown() Destroyer of worlds. Source code: core/World.js (Line 158)

World#sort()

sort(key, order) Sort the children in the group according to a particular key and ordering. Call this function to sort the group according to a particular key value and order. For example to depth sort Sprites for Zelda-style game you might call group.sort('y', Phaser.Group.SORT_ASCENDING) at the bottom of your State.update(). Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, includingalphabetical sorting, mixing strings and numbers, an

World#subAll()

subAll(property, amount, checkAlive, checkVisible) Subtracts the amount from the given property on all children in this group. Group.subAll('x', 10) will minus 10 from the child.x value for each child. Parameters Name Type Description property string The property to decrement, for example 'body.velocity.x' or 'angle'. amount number The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. checkAlive boolean If true the property will only be

World#swap()

swap(child1, child2) Swaps the position of two children in this group. Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped. Parameters Name Type Description child1 any The first child to swap. child2 any The second child to swap. Inherited From Phaser.Group#swap Source code: core/Group.js (Line 891)

World#swapChildren()

swapChildren(child, child2) Swaps the position of 2 Display Objects within this container. Parameters Name Type Description child DisplayObject - child2 DisplayObject - Inherited From PIXI.DisplayObjectContainer#swapChildren Source code: pixi/display/DisplayObjectContainer.js (Line 85)

World#top

top : number The top coordinate of this Group. It is derived by calling getBounds, calculating the Groups dimensions based on itsvisible children. Inherited From Phaser.Group#top Source code: core/Group.js (Line 2817)

World#total

[readonly] total : integer Total number of existing children in the group. Inherited From Phaser.Group#total Source code: core/Group.js (Line 2648)

World#visible

visible : boolean The visible state of the group. Non-visible Groups and all of their children are not rendered. Inherited From Phaser.Group#visible Source code: core/Group.js (Line 2996)

World#width

width : number Gets or sets the current width of the game world. The world can never be smaller than the game (canvas) dimensions. Source code: core/World.js (Line 243)

World#World

new World(game) "This world is but a canvas to our imagination." - Henry David Thoreau A game has only one world. The world is an abstract place in which all game objects live. It is not boundby stage limits and can be any size. You look into the world via cameras. All game objects live withinthe world at world-based coordinates. By default a world is created the same size as your Stage. Parameters Name Type Description game Phaser.Game Reference to the current game instance. Source code