World#getAll()

getAll(property, value, startIndex, endIndex) → {any} Returns all children in this Group. You can optionally specify a matching criteria using the property and value arguments. For example: getAll('exists', true) would return only children that have their exists property set. Optionally you can specify a start and end index. For example if this Group had 100 children,and you set startIndex to 0 and endIndex to 50, it would return a random child from onlythe first 50 children in the Group. Pa

World#forEachExists()

forEachExists(callback, callbackContext, args) Call a function on each existing child in this group. See forEach for details. Parameters Name Type Argument Default Description callback function The function that will be called for each applicable child. The child will be passed as the first argument. callbackContext object The context in which the function should be called (usually 'this'). args any <optional> <repeatable> (none) Additional arguments to pass to t

World#forEachDead()

forEachDead(callback, callbackContext, args) Call a function on each dead child in this group. See forEach for details. Parameters Name Type Argument Default Description callback function The function that will be called for each applicable child. The child will be passed as the first argument. callbackContext object The context in which the function should be called (usually 'this'). args any <optional> <repeatable> (none) Additional arguments to pass to the cal

World#forEachAlive()

forEachAlive(callback, callbackContext, args) Call a function on each alive child in this group. See forEach for details. Parameters Name Type Argument Default Description callback function The function that will be called for each applicable child. The child will be passed as the first argument. callbackContext object The context in which the function should be called (usually 'this'). args any <optional> <repeatable> (none) Additional arguments to pass to the c

World#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

World#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)

World#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

World#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)

World#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)

World#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)