World#wrap()

wrap(sprite, padding, useBounds, horizontal, vertical) This will take the given game object and check if its x/y coordinates fall outside of the world bounds.If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect.If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function. Please understand there are limitations to this method. For example if you have scaled the Worldthen objects won't always be re-

World#x

x : number The x coordinate of the group container. You can adjust the group container itself by modifying its coordinates.This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position. Inherited From Phaser.Group#x Source code: core/Group.js (Line 2969)

World#xy()

xy(index, x, y) Positions the child found at the given index within this group to the given x and y coordinates. Parameters Name Type Description index integer The index of the child in the group to set the position of. x number The new x position of the child. y number The new y position of the child. Inherited From Phaser.Group#xy Source code: core/Group.js (Line 993)

World#y

y : number The y coordinate of the group container. You can adjust the group container itself by modifying its coordinates.This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position. Inherited From Phaser.Group#y Source code: core/Group.js (Line 2978)

World#z

[readonly] z : integer The z-depth value of this object within its parent container/Group - the World is a Group as well.This value must be unique for each child in a Group. Inherited From Phaser.Group#z Source code: core/Group.js (Line 57)

World#_definedSize

[readonly] _definedSize : boolean True if the World has been given a specifically defined size (i.e. from a Tilemap or direct in code) or false if it's just matched to the Game dimensions. Source code: core/World.js (Line 41)

World#_height

_height Properties: Name Type Description height number The defined height of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension. Source code: core/World.js (Line 51)

World#_width

_width Properties: Name Type Description width number The defined width of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension. Source code: core/World.js (Line 46)

Arithmetic Operators

3.4.1 – Arithmetic Operators Lua supports the following arithmetic operators: +: addition -: subtraction *: multiplication /: float division //: floor division %: modulo ^: exponentiation -: unary minus With the exception of exponentiation and float division, the arithmetic operators work as follows: If both operands are integers, the operation is performed over integers and the result is an integer. Otherwise, if both operands are numbers or strings that can be converted to number

assert()

assert (v [, message]) Calls error if the value of its argument v is false (i.e., nil or false); otherwise, returns all its arguments. In case of error, message is the error object; when absent, it defaults to "assertion failed!"