FlexLayer#forEach()

forEach(callback, callbackContext, checkExists, args) Call a function on each child in this group. Additional arguments for the callback can be specified after the checkExists parameter. For example, Group.forEach(awardBonusGold, this, true, 100, 500) would invoke awardBonusGold function with the parameters (child, 100, 500). Note: This check will skip any children which are Groups themselves. Parameters Name Type Argument Default Description callback function The function that will be

FlexLayer#FlexLayer

new FlexLayer(manager, position, bounds, scale) WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.Please try to avoid using in production games with a long time to build.This is also why the documentation is incomplete. A responsive grid layer. Parameters Name Type Description manager Phaser.FlexGrid The FlexGrid that owns this FlexLayer. position Phaser.Point A reference to the Point object used for positioning. bounds Ph

FlexLayer#fixedToCamera

fixedToCamera : boolean A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset. Note that the cameraOffset values are in addition to any parent in the display list.So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x Inherited From Phaser.Group#fixedToCamera Source code: core/Group.js (Line 265)

FlexLayer#filter()

filter(predicate, checkExists) → {Phaser.ArraySet} Find children matching a certain predicate. For example: var healthyList = Group.filter(function(child, index, children) { return child.health > 10 ? true : false; }, true); healthyList.callAll('attack'); Note: Currently this will skip any children which are Groups themselves. Parameters Name Type Argument Default Description predicate function The function that each child will be evaluated against. Each child of the group will

FlexLayer#exists

exists : boolean If exists is true the group is updated, otherwise it is skipped. Inherited From Phaser.Group#exists Default Value true Source code: core/Group.js (Line 100)

FlexLayer#enableBodyDebug

enableBodyDebug : boolean If true when a physics body is created (via enableBody) it will create a physics debug object as well. This only works for P2 bodies. Inherited From Phaser.Group#enableBodyDebug Source code: core/Group.js (Line 217)

FlexLayer#enableBody

enableBody : boolean If true all Sprites created by, or added to this group, will have a physics body enabled on them. If there are children already in the Group at the time you set this property, they are not changed. The default body type is controlled with physicsBodyType. Inherited From Phaser.Group#enableBody Source code: core/Group.js (Line 208)

FlexLayer#divideAll()

divideAll(property, amount, checkAlive, checkVisible) Divides the given property by the amount on all children in this group. Group.divideAll('x', 2) will half the child.x value for each child. Parameters Name Type Description property string The property to divide, for example 'body.velocity.x' or 'angle'. amount number The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. checkAlive boolean If true the property will only be changed if

FlexLayer#destroy()

destroy(destroyChildren, soft) Destroys this group. Removes all children, then removes this group from its parent and nulls references. Parameters Name Type Argument Default Description destroyChildren boolean <optional> true If true destroy will be invoked on each removed child. soft boolean <optional> false A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. Inherited From Phaser.Group#destr

FlexLayer#debug()

debug() Debug. Source code: core/FlexLayer.js (Line 101)