Phaser.Particles.Arcade. Emitter

new Emitter(game, x, y, maxParticles)

Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

Parameters:
Name Type Argument Default Description
game Phaser.Game

Current game instance.

x number <optional>
0

The x coordinate within the Emitter that the particles are emitted from.

y number <optional>
0

The y coordinate within the Emitter that the particles are emitted from.

maxParticles number <optional>
50

The total number of particles in this emitter.

Source - particles/arcade/Emitter.js, line 20

Extends

Members

alive :boolean

The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

Inherited From:
Default Value:
  • true
Source - core/Group.js, line 83

alpha :number

The alpha value of the group container.

Inherited From:
Source - core/Group.js, line 2029

alphaData :array

An array of the calculated alpha easing data applied to particles with alphaRates > 0.

Source - particles/arcade/Emitter.js, line 103

angle :number

The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

Inherited From:
Source - core/Group.js, line 1961

angularDrag :number

The angular drag component of particles launched from the emitter if they are rotating.

Default Value:
  • 0
Source - particles/arcade/Emitter.js, line 126

area :Phaser.Rectangle

The area of the emitter. Particles can be randomly generated from anywhere within this rectangle.

Source - particles/arcade/Emitter.js, line 45

autoAlpha :boolean

When a new Particle is emitted this controls if it will automatically change alpha. Use Emitter.setAlpha to configure.

Source - particles/arcade/Emitter.js, line 187

autoScale :boolean

When a new Particle is emitted this controls if it will automatically scale in size. Use Emitter.setScale to configure.

Source - particles/arcade/Emitter.js, line 182

blendMode :number

The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)

Source - particles/arcade/Emitter.js, line 161

<readonly> bottom :number

Gets the bottom position of the Emitter.

Source - particles/arcade/Emitter.js, line 818

bounce :Phaser.Point

How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.

Source - particles/arcade/Emitter.js, line 143

buttonMode :Boolean

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

Inherited From:
Source - pixi/display/DisplayObject.js, line 90

cacheAsBitmap :Boolean

Set if this display object is cached as a bitmap. This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects. To remove simply set this property to 'null'

Inherited From:
Source - pixi/display/DisplayObject.js, line 436

cameraOffset :Phaser.Point

If this object is fixedToCamera then this stores the x/y position offset relative to the top-left of the camera view.

Inherited From:
Source - core/Group.js, line 129

<readonly> children :Array.<DisplayObject>

[read-only] The array of children of this container.

Type:
Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 17

classType :object

The type of objects that will be created when using create or createMultiple.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: (game, x, y, key, frame).

Inherited From:
Default Value:
Source - core/Group.js, line 108

cursor :DisplayObject

The current display object that the group cursor is pointing to, if any. (Can be set manully.)

The cursor is a way to iterate through the children in a Group using next and previous.

Inherited From:
Source - core/Group.js, line 123

emitX :number

The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

Source - particles/arcade/Emitter.js, line 169

emitY :number

The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

Source - particles/arcade/Emitter.js, line 177

enableBody :boolean

If true all Sprites created by, or added to this group, will have a physics body enabled on them.

The default body type is controlled with physicsBodyType.

Inherited From:
Source - core/Group.js, line 137

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:
Default Value:
  • false
Source - core/Group.js, line 146

exists :boolean

If exists is true the group is updated, otherwise it is skipped.

Inherited From:
Default Value:
  • true
Source - core/Group.js, line 90

filterArea :PIXI.Rectangle

The area the filter is applied to like the hitArea this is used as more of an optimisation rather than figuring out the dimensions of the displayObject each frame you can set this rectangle

Inherited From:
Source - pixi/display/DisplayObject.js, line 180

filters :Array.<Filter>

Sets the filters for the displayObject. IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. To remove filters simply set this property to 'null'

Type:
  • Array.<Filter>
Inherited From:
Source - pixi/display/DisplayObject.js, line 400

fixedToCamera :boolean

Is this group fixed to the camera?

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 cameraOffset and 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:
Source - core/Group.js, line 1984

frequency :number

How often a particle is emitted in ms (if emitter is started with Explode === false).

Default Value:
  • 100
Source - particles/arcade/Emitter.js, line 132

<internal> game :Phaser.Game

A reference to the currently running Game.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 38

gravity :number

Sets the body.gravity.y of each particle sprite to this value on launch.

Default Value:
  • 100
Source - particles/arcade/Emitter.js, line 109

height :number

Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.

Source - particles/arcade/Emitter.js, line 731

hitArea :PIXI.Rectangle|PIXI.Circle|PIXI.Ellipse|PIXI.Polygon

This is the defined area that will pick up mouse / touch events. It is null by default. Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

Type:
Inherited From:
Source - pixi/display/DisplayObject.js, line 81

ignoreDestroy :boolean

A group with ignoreDestroy set to true ignores all calls to its destroy method.

Inherited From:
Default Value:
  • false
Source - core/Group.js, line 97

<readonly> left :number

Gets the left position of the Emitter.

Source - particles/arcade/Emitter.js, line 779

<readonly> length :integer

Total number of children in this group, regardless of exists/alive status.

Inherited From:
Source - core/Group.js, line 1944

lifespan :number

How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.

Default Value:
  • 2000
Source - particles/arcade/Emitter.js, line 138

mask :PIXI.Graphics

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. To remove a mask, set this property to null.

Inherited From:
Source - pixi/display/DisplayObject.js, line 380

maxParticleAlpha :number

The maximum possible alpha value of a particle.

Default Value:
  • 1
Source - particles/arcade/Emitter.js, line 98

maxParticles :number

The total number of particles in this emitter.

Source - particles/arcade/Emitter.js, line 26

maxParticleScale :number

The maximum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see maxParticleScaleX.

Default Value:
  • 1
Source - particles/arcade/Emitter.js, line 69

maxParticleSpeed :Phaser.Point

The maximum possible velocity of a particle.

Source - particles/arcade/Emitter.js, line 57

maxRotation :number

The maximum possible angular velocity of a particle.

Default Value:
  • 360
Source - particles/arcade/Emitter.js, line 86

minParticleAlpha :number

The minimum possible alpha value of a particle.

Default Value:
  • 1
Source - particles/arcade/Emitter.js, line 92

minParticleScale :number

The minimum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see minParticleScaleX.

Default Value:
  • 1
Source - particles/arcade/Emitter.js, line 63

minParticleSpeed :Phaser.Point

The minimum possible velocity of a particle.

Source - particles/arcade/Emitter.js, line 51

minRotation :number

The minimum possible angular velocity of a particle.

Source - particles/arcade/Emitter.js, line 80

name :string

A handy string name for this emitter. Can be set to anything.

Source - particles/arcade/Emitter.js, line 33

on :boolean

Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.

Default Value:
  • false
Source - particles/arcade/Emitter.js, line 149

onDestroy :Phaser.Signal

This signal is dispatched when the group is destroyed.

Inherited From:
Source - core/Group.js, line 160

<readonly> parent :PIXI.DisplayObjectContainer

[read-only] The display object container that contains this display object.

Inherited From:
Source - pixi/display/DisplayObject.js, line 106

particleAnchor :Phaser.Point

When a particle is created its anchor will be set to match this Point object (defaults to x/y: 0.5 to aid in rotation)

Source - particles/arcade/Emitter.js, line 155

particleBringToTop :boolean

If this is true then when the Particle is emitted it will be bought to the top of the Emitters display list.

Default Value:
  • false
Source - particles/arcade/Emitter.js, line 193

particleClass :any

For emitting your own particle class types. They must extend Phaser.Particle.

Source - particles/arcade/Emitter.js, line 115

particleDrag :Phaser.Point

The X and Y drag component of particles launched from the emitter.

Source - particles/arcade/Emitter.js, line 120

particleSendToBack :boolean

If this is true then when the Particle is emitted it will be sent to the back of the Emitters display list.

Default Value:
  • false
Source - particles/arcade/Emitter.js, line 199

physicsBodyType :integer

If enableBody is true this is the type of physics body that is created on new Sprites.

The valid values are Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.

Inherited From:
Source - core/Group.js, line 154

pivot :PIXI.Point

The pivot point of the displayObject that it rotates around

Inherited From:
Source - pixi/display/DisplayObject.js, line 49

position :PIXI.Point

The coordinate of the object relative to the local coordinates of the parent.

Inherited From:
Source - pixi/display/DisplayObject.js, line 14

renderable :Boolean

Can this object be rendered

Inherited From:
Source - pixi/display/DisplayObject.js, line 98

Gets the right position of the Emitter.

Source - particles/arcade/Emitter.js, line 792

rotation :number

The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

Inherited From:
Source - core/Group.js, line 2025

scale :Phaser.Point

The scale of the group container.

Inherited From:
Source - core/Group.js, line 115

scaleData :array

An array of the calculated scale easing data applied to particles with scaleRates > 0.

Source - particles/arcade/Emitter.js, line 74

<readonly> stage :PIXI.Stage

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

Inherited From:
Source - pixi/display/DisplayObject.js, line 115

<readonly> top :number

Gets the top position of the Emitter.

Source - particles/arcade/Emitter.js, line 805

<readonly> total :integer

Total number of existing children in the group.

Inherited From:
Source - core/Group.js, line 1927

transformCallback :function

The transform callback is an optional callback that if set will be called at the end of the updateTransform method and sent two parameters: This Display Objects worldTransform matrix and its parents transform matrix. Both are PIXI.Matrix object types. The matrix are passed by reference and can be modified directly without needing to return them. This ability allows you to check any of the matrix values and perform actions such as clamping scale or limiting rotation, regardless of the parent transforms.

Inherited From:
Source - pixi/display/DisplayObject.js, line 30

transformCallbackContext :Object

The context under which the transformCallback is invoked.

Inherited From:
Source - pixi/display/DisplayObject.js, line 41

<internal> type :number

Internal Phaser Type value.

Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - particles/arcade/Emitter.js, line 39

visible :boolean

The visible state of the group. Non-visible Groups and all of their children are not rendered.

Inherited From:
Source - core/Group.js, line 2027

width :number

Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.

Source - particles/arcade/Emitter.js, line 715

<readonly> worldAlpha :Number

[read-only] The multiplied alpha of the displayObject

Inherited From:
Source - pixi/display/DisplayObject.js, line 124

worldVisible :Boolean

[read-only] Indicates if the sprite is globally visible.

Inherited From:
Source - pixi/display/DisplayObject.js, line 359

x :number

Gets or sets the x position of the Emitter.

Source - particles/arcade/Emitter.js, line 747

y :number

Gets or sets the y position of the Emitter.

Source - particles/arcade/Emitter.js, line 763

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:
Source - core/Group.js, line 56

Methods

add(child, silent) → {DisplayObject}

Adds an existing object as the top child in this group.

The child is automatically added to the top of the group and is displayed on top of every previous child.

Use addAt to control where a child is added. Use create to create and add a new child.

Parameters:
Name Type Argument Default Description
child DisplayObject

The display object to add as a child.

silent boolean <optional>
false

If true the child will not dispatch the onAddedToGroup event.

Returns:

The child that was added to the group.

Inherited From:
Source - core/Group.js, line 226

addAll(property, amount, checkAlive, checkVisible)

Adds the amount to the given property on all children in this group.

Group.addAll('x', 10) will add 10 to the child.x value for each child.

Parameters:
Name Type Description
property string

The property to increment, for example 'body.velocity.x' or 'angle'.

amount number

The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.

checkAlive boolean

If true the property will only be changed if the child is alive.

checkVisible boolean

If true the property will only be changed if the child is visible.

Inherited From:
Source - core/Group.js, line 998

addAt(child, index, silent) → {DisplayObject}

Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

Parameters:
Name Type Argument Default Description
child DisplayObject

The display object to add as a child.

index integer <optional>
0

The index within the group to insert the child to.

silent boolean <optional>
false

If true the child will not dispatch the onAddedToGroup event.

Returns:

The child that was added to the group.

Inherited From:
Source - core/Group.js, line 294

addChild(child) → {PIXI.DisplayObject}

Adds a child to the container.

Parameters:
Name Type Description
child PIXI.DisplayObject

The DisplayObject to add to the container

Returns:

The child that was added.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 90

addChildAt(child, index) → {PIXI.DisplayObject}

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

Parameters:
Name Type Description
child PIXI.DisplayObject

The child to add

index Number

The index to place the child in

Returns:

The child that was added.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 102

addMultiple(children, silent) → {DisplayObject[]}

Adds an array of existing display objects to this group.

The children are automatically added to the top of the group, so render on-top of everything else within the group.

TODO: Add ability to pass the children as parameters rather than having to be an array.

Parameters:
Name Type Argument Default Description
children DisplayObject[]

An array of display objects to add as children.

silent boolean <optional>
false

If true the children will not dispatch the onAddedToGroup event.

Returns:
DisplayObject[] -

The array of children that were added to the group.

Inherited From:
Source - core/Group.js, line 268

<internal> ascendingSortHandler(a, b)

An internal helper function for the sort process.

Parameters:
Name Type Description
a object

The first object being sorted.

b object

The second object being sorted.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 1499

at(object)

Change the emitters center to match the center of any object with a center property, such as a Sprite. If the object doesn't have a center property it will be set to object.x + object.width / 2

Parameters:
Name Type Description
object object | Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Text | PIXI.DisplayObject

The object that you wish to match the center with.

Source - particles/arcade/Emitter.js, line 693

bringToTop(child) → {any}

Brings the given child to the top of this group so it renders above all other children.

Parameters:
Name Type Description
child any

The child to bring to the top of this group.

Returns:
any -

The child that was moved.

Inherited From:
Source - core/Group.js, line 546

callAll(method, context, args)

Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

Parameters:
Name Type Argument Default Description
method string

Name of the function on the child to call. Deep property lookup is supported.

context string <optional>
null

A string containing the context under which the method will be executed. Set to null to default to the child.

args any <repeatable>

Additional parameters that will be passed to the method.

Inherited From:
Source - core/Group.js, line 1148

callAllExists(callback, existsValue, parameter)

Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

Parameters:
Name Type Argument Description
callback string

Name of the function on the children to call.

existsValue boolean

Only children with exists=existsValue will be called.

parameter any <repeatable>

Additional parameters that will be passed to the callback.

Inherited From:
Source - core/Group.js, line 1066

<internal> callbackFromArray(child, callback, length)

Returns a reference to a function that exists on a child of the group based on the given callback array.

Parameters:
Name Type Description
child object

The object to inspect.

callback array

The array of function names.

length integer

The size of the array (pre-calculated in callAll).

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 1095

checkAll(key, value, checkAlive, checkVisible, force)

Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

Parameters:
Name Type Argument Default Description
key string

The property, as a string, to be set. For example: 'body.velocity.x'

value any

The value that will be checked.

checkAlive boolean <optional>
false

If set then only children with alive=true will be checked. This includes any Groups that are children.

checkVisible boolean <optional>
false

If set then only children with visible=true will be checked. This includes any Groups that are children.

force boolean <optional>
false

If force is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.

Inherited From:
Source - core/Group.js, line 965

checkProperty(child, key, value, force) → {boolean}

Checks a property for the given value on the child.

Parameters:
Name Type Argument Default Description
child any

The child to check the property value on.

key array

An array of strings that make up the property that will be set.

value any

The value that will be checked.

force boolean <optional>
false

If force is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.

Returns:
boolean -

True if the property was was equal to value, false if not.

Inherited From:
Source - core/Group.js, line 829

countDead() → {integer}

Get the number of dead children in this group.

Returns:
integer -

The number of children flagged as dead.

Inherited From:
Source - core/Group.js, line 1721

countLiving() → {integer}

Get the number of living children in this group.

Returns:
integer -

The number of children flagged as alive.

Inherited From:
Source - core/Group.js, line 1709

create(x, y, key, frame, exists) → {DisplayObject}

Creates a new Phaser.Sprite object and adds it to the top of this group.

Use classType to change the type of object creaded.

Parameters:
Name Type Argument Default Description
x number

The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point.

y number

The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point.

key string

The Game.cache key of the image that this Sprite will use.

frame integer | string <optional>

If the Sprite image contains multiple frames you can specify which one to use here.

exists boolean <optional>
true

The default exists state of the Sprite.

Returns:

The child that was created: will be a Phaser.Sprite unless #classType has been changed.

Inherited From:
Source - core/Group.js, line 355

createMultiple(quantity, key, frame, exists)

Creates multiple Phaser.Sprite objects and adds them to the top of this group.

Useful if you need to quickly generate a pool of identical sprites, such as bullets.

By default the sprites will be set to not exist and will be positioned at 0, 0 (relative to the group.x/y). Use classType to change the type of object creaded.

Parameters:
Name Type Argument Default Description
quantity integer

The number of Sprites to create.

key string

The Game.cache key of the image that this Sprite will use.

frame integer | string <optional>

If the Sprite image contains multiple frames you can specify which one to use here.

exists boolean <optional>
false

The default exists state of the Sprite.

Inherited From:
Source - core/Group.js, line 401

customSort(sortHandler, context)

Sort the children in the group according to custom sort function.

The sortHandler is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if a > b, 1 if a < b or 0 if a === b.

Parameters:
Name Type Argument Default Description
sortHandler function

The custom sort function.

context object <optional>
undefined

The context in which the sortHandler is called.

Inherited From:
Source - core/Group.js, line 1475

<internal> descendingSortHandler(a, b)

An internal helper function for the sort process.

Parameters:
Name Type Description
a object

The first object being sorted.

b object

The second object being sorted.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 1531

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:
Source - core/Group.js, line 1891

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 the child is alive.

checkVisible boolean

If true the property will only be changed if the child is visible.

Inherited From:
Source - core/Group.js, line 1049

emitParticle() → {boolean}

This function can be used both internally and externally to emit the next particle in the queue.

Returns:
boolean -

True if a particle was emitted, otherwise false.

Source - particles/arcade/Emitter.js, line 453

explode(lifespan, quantity)

Call this function to emit the given quantity of particles at all once (an explosion)

Parameters:
Name Type Argument Default Description
lifespan number <optional>
0

How long each particle lives once emitted in ms. 0 = forever.

quantity number <optional>
0

How many particles to launch.

Source - particles/arcade/Emitter.js, line 379

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 be passed to it as its first parameter, the index as the second, and the entire child array as the third

checkExists boolean <optional>
false

If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate.

Returns:

Returns an array list containing all the children that the predicate returned true for

Inherited From:
Source - core/Group.js, line 1280

flow(lifespan, frequency, quantity)

Call this function to start emitting a flow of particles at the given frequency.

Parameters:
Name Type Argument Default Description
lifespan number <optional>
0

How long each particle lives once emitted in ms. 0 = forever.

frequency number <optional>
250

Frequency is how often to emit a particle, given in ms.

quantity number <optional>
0

How many particles to launch.

Source - particles/arcade/Emitter.js, line 392

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 thee awardBonusGolds with the parameters (child, 100, 500).

Note: Currently this will skip any children which are Groups themselves.

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').

checkExists boolean <optional>
false

If set only children matching for which exists is true will be passed to the callback, otherwise all children will be passed.

args any <optional>
<repeatable>
(none)

Additional arguments to pass to the callback function, after the child item.

Inherited From:
Source - core/Group.js, line 1320

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 callback function, after the child item.

Inherited From:
Source - core/Group.js, line 1393

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 callback function, after the child item.

Inherited From:
Source - core/Group.js, line 1416

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 the callback function, after the child item.

Inherited From:
Source - core/Group.js, line 1370

generateTexture(resolution, scaleMode, renderer) → {PIXI.Texture}

Useful function that returns a texture of the displayObject object that can then be used to create sprites This can be quite useful if your displayObject is static / complicated and needs to be reused multiple times.

Parameters:
Name Type Description
resolution Number

The resolution of the texture being generated

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

renderer PIXI.CanvasRenderer | PIXI.WebGLRenderer

The renderer used to generate the texture.

Returns:

a texture of the graphics object

Inherited From:
Source - pixi/display/DisplayObject.js, line 582

getAt(index) → {DisplayObject}

Returns the child found at the given index within this group.

Parameters:
Name Type Description
index integer

The index to return the child from.

Returns:

The child that was found at the given index, or -1 for an invalid index.

Inherited From:
Source - core/Group.js, line 335

getBottom() → {any}

Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

Returns:
any -

The child at the bottom of the Group.

Inherited From:
Source - core/Group.js, line 1692

getBounds() → {PIXI.Rectangle}

Retrieves the bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

Returns:

The rectangular bounding area

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 302

getChildAt(index) → {PIXI.DisplayObject}

Returns the child at the specified index

Parameters:
Name Type Description
index Number

The index to get the child from

Returns:

The child at the given index, if any.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 193

getChildIndex(child) → {Number}

Returns the index position of a child DisplayObject instance

Parameters:
Name Type Description
child PIXI.DisplayObject

The DisplayObject instance to identify

Returns:
Number -

The index position of the child display object to identify

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 158

getFirstAlive() → {any}

Get the first child that is alive (child.alive === true).

This is handy for checking if everything has been wiped out, or choosing a squad leader, etc.

Returns:
any -

The first alive child, or null if none found.

Inherited From:
Source - core/Group.js, line 1647

getFirstDead() → {any}

Get the first child that is dead (child.alive === false).

This is handy for checking if everything has been wiped out, or choosing a squad leader, etc.

Returns:
any -

The first dead child, or null if none found.

Inherited From:
Source - core/Group.js, line 1661

getFirstExists(exists) → {any}

Get the first display object that exists, or doesn't exist.

Parameters:
Name Type Argument Default Description
exists boolean <optional>
true

If true, find the first existing child; otherwise find the first non-existing child.

Returns:
any -

The first child, or null if none found.

Inherited From:
Source - core/Group.js, line 1629

getIndex(child) → {integer}

Get the index position of the given child in this group, which should match the child's z property.

Parameters:
Name Type Description
child any

The child to get the index for.

Returns:
integer -

The index of the child or -1 if it's not a member of this group.

Inherited From:
Source - core/Group.js, line 668

getLocalBounds() → {PIXI.Rectangle}

Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration.

Returns:

The rectangular bounding area

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 362

getRandom(startIndex, length) → {any}

Returns a random child from the group.

Parameters:
Name Type Argument Default Description
startIndex integer <optional>
0

Offset from the front of the front of the group (lowest child).

length integer <optional>
(to top)

Restriction on the number of values you want to randomly select from.

Returns:
any -

A random child of this Group.

Inherited From:
Source - core/Group.js, line 1733

getTop() → {any}

Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

Returns:
any -

The child at the top of the Group.

Inherited From:
Source - core/Group.js, line 1675

hasProperty(child, key) → {boolean}

Checks if the child has the given property.

Will scan up to 4 levels deep only.

Parameters:
Name Type Description
child any

The child to check for the existance of the property on.

key string[]

An array of strings that make up the property.

Returns:
boolean -

True if the child has the property, otherwise false.

Inherited From:
Source - core/Group.js, line 716

iterate(key, value, returnType, callback, callbackContext, args) → {any}

Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named key, whose value is equal to value according to a strict equality comparison.

The result depends on the returnType:

  • RETURN_TOTAL: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • RETURN_NONE: The callback, if any, is applied to all matching children. No value is returned.
  • RETURN_CHILD: The callback, if any, is applied to the first matching child and the first matched child is returned. If there is no matching child then null is returned.

If args is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

Parameters:
Name Type Argument Default Description
key string

The child property to check, i.e. 'exists', 'alive', 'health'

value any

A child matches if child[key] === value is true.

returnType integer

How to iterate the childen and what to return.

callback function <optional>
null

Optional function that will be called on each matching child. The matched child is supplied as the first argument.

callbackContext object <optional>

The context in which the function should be called (usually 'this').

args any[] <optional>
(none)

The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child.

Returns:
any -

Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null.

Inherited From:
Source - core/Group.js, line 1556

kill()

Call this function to turn off all the particles and the emitter.

Source - particles/arcade/Emitter.js, line 354

makeParticles(keys, frames, quantity, collide, collideWorldBounds) → {Phaser.Particles.Arcade.Emitter}

This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

Parameters:
Name Type Argument Default Description
keys array | string

A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random.

frames array | number <optional>
0

A frame number, or array of frames that the sprite will use. If an array one is picked at random.

quantity number <optional>

The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity.

collide boolean <optional>
false

If you want the particles to be able to collide with other Arcade Physics bodies then set this to true.

collideWorldBounds boolean <optional>
false

A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World.

Returns:

This Emitter instance.

Source - particles/arcade/Emitter.js, line 282

moveDown(child) → {any}

Moves the given child down one place in this group unless it's already at the bottom.

Parameters:
Name Type Description
child any

The child to move down in the group.

Returns:
any -

The child that was moved.

Inherited From:
Source - core/Group.js, line 608

moveUp(child) → {any}

Moves the given child up one place in this group unless it's already at the top.

Parameters:
Name Type Description
child any

The child to move up in the group.

Returns:
any -

The child that was moved.

Inherited From:
Source - core/Group.js, line 584

multiplyAll(property, amount, checkAlive, checkVisible)

Multiplies the given property by the amount on all children in this group.

Group.multiplyAll('x', 2) will x2 the child.x value for each child.

Parameters:
Name Type Description
property string

The property to multiply, for example 'body.velocity.x' or 'angle'.

amount number

The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.

checkAlive boolean

If true the property will only be changed if the child is alive.

checkVisible boolean

If true the property will only be changed if the child is visible.

Inherited From:
Source - core/Group.js, line 1032

next() → {any}

Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

Returns:
any -

The child the cursor now points to.

Inherited From:
Source - core/Group.js, line 472

<internal> postUpdate()

The core postUpdate - as called by World.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 1256

<internal> preUpdate()

The core preUpdate - as called by World.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 1216

previous() → {any}

Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

Returns:
any -

The child the cursor now points to.

Inherited From:
Source - core/Group.js, line 501

remove(child, destroy, silent) → {boolean}

Removes the given child from this group.

This will dispatch an onRemovedFromGroup event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

Parameters:
Name Type Argument Default Description
child any

The child to remove.

destroy boolean <optional>
false

If true destroy will be invoked on the removed child.

silent boolean <optional>
false

If true the the child will not dispatch the onRemovedFromGroup event.

Returns:
boolean -

true if the child was removed from this group, otherwise false.

Inherited From:
Source - core/Group.js, line 1755

removeAll(destroy, silent)

Removes all children from this group, but does not remove the group from its parent.

Parameters:
Name Type Argument Default Description
destroy boolean <optional>
false

If true destroy will be invoked on each removed child.

silent boolean <optional>
false

If true the children will not dispatch their onRemovedFromGroup events.

Inherited From:
Source - core/Group.js, line 1801

removeBetween(startIndex, endIndex, destroy, silent)

Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

Parameters:
Name Type Argument Default Description
startIndex integer

The index to start removing children from.

endIndex integer <optional>

The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group.

destroy boolean <optional>
false

If true destroy will be invoked on each removed child.

silent boolean <optional>
false

If true the children will not dispatch their onRemovedFromGroup events.

Inherited From:
Source - core/Group.js, line 1838

removeChild(child) → {PIXI.DisplayObject}

Removes a child from the container.

Parameters:
Name Type Description
child PIXI.DisplayObject

The DisplayObject to remove

Returns:

The child that was removed.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 210

removeChildAt(index) → {PIXI.DisplayObject}

Removes a child from the specified index position.

Parameters:
Name Type Description
index Number

The index to get the child from

Returns:

The child that was removed.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 225

removeChildren(beginIndex, endIndex)

Removes all children from this container that are within the begin and end indexes.

Parameters:
Name Type Description
beginIndex Number

The beginning position. Default value is 0.

endIndex Number

The ending position. Default value is size of the container.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 243

removeStageReference()

Removes the current stage reference from the container and all of its children.

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 404

replace(oldChild, newChild) → {any}

Replaces a child of this group with the given newChild. The newChild cannot be a member of this group.

Parameters:
Name Type Description
oldChild any

The child in this group that will be replaced.

newChild any

The child to be inserted into this group.

Returns:
any -

Returns the oldChild that was replaced within this group.

Inherited From:
Source - core/Group.js, line 681

resetCursor(index) → {any}

Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

Parameters:
Name Type Argument Default Description
index integer <optional>
0

Set the cursor to point to a specific index.

Returns:
any -

The child the cursor now points to.

Inherited From:
Source - core/Group.js, line 445

reverse()

Reverses all children in this group.

This operaation applies only to immediate children and does not propagate to subgroups.

Inherited From:
Source - core/Group.js, line 654

revive()

Handy for bringing game objects "back to life". Just sets alive and exists back to true.

Source - particles/arcade/Emitter.js, line 367

sendToBack(child) → {any}

Sends the given child to the bottom of this group so it renders below all other children.

Parameters:
Name Type Description
child any

The child to send to the bottom of this group.

Returns:
any -

The child that was moved.

Inherited From:
Source - core/Group.js, line 565

set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

Parameters:
Name Type Argument Default Description
child Phaser.Sprite

The child to set the property on.

key string

The property, as a string, to be set. For example: 'body.velocity.x'

value any

The value that will be set.

checkAlive boolean <optional>
false

If set then the child will only be updated if alive=true.

checkVisible boolean <optional>
false

If set then the child will only be updated if visible=true.

operation integer <optional>
0

Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.

force boolean <optional>
false

If force is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.

Returns:
boolean -

True if the property was set, false if not.

Inherited From:
Source - core/Group.js, line 858

setAll(key, value, checkAlive, checkVisible, operation, force)

Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see Group.setAllChildren.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

Parameters:
Name Type Argument Default Description
key string

The property, as a string, to be set. For example: 'body.velocity.x'

value any

The value that will be set.

checkAlive boolean <optional>
false

If set then only children with alive=true will be updated. This includes any Groups that are children.

checkVisible boolean <optional>
false

If set then only children with visible=true will be updated. This includes any Groups that are children.

operation integer <optional>
0

Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.

force boolean <optional>
false

If force is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.

Inherited From:
Source - core/Group.js, line 889

setAllChildren(key, value, checkAlive, checkVisible, operation, force)

Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with setAll the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

Parameters:
Name Type Argument Default Description
key string

The property, as a string, to be set. For example: 'body.velocity.x'

value any

The value that will be set.

checkAlive boolean <optional>
false

If set then only children with alive=true will be updated. This includes any Groups that are children.

checkVisible boolean <optional>
false

If set then only children with visible=true will be updated. This includes any Groups that are children.

operation integer <optional>
0

Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.

force boolean <optional>
false

If force is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.

Inherited From:
Source - core/Group.js, line 924

setAlpha(min, max, rate, ease, yoyo)

A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

Parameters:
Name Type Argument Default Description
min number <optional>
1

The minimum value for this range.

max number <optional>
1

The maximum value for this range.

rate number <optional>
0

The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two.

ease number <optional>
Phaser.Easing.Linear.None

If you've set a rate > 0 this is the easing formula applied between the min and max values.

yoyo boolean <optional>
false

If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values)

Source - particles/arcade/Emitter.js, line 606

setChildIndex(child, index)

Changes the position of an existing child in the display object container

Parameters:
Name Type Description
child PIXI.DisplayObject

The child DisplayObject instance for which you want to change the index number

index Number

The resulting index number for the child display object

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 175

setProperty(child, key, value, operation, force) → {boolean}

Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is true a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

Parameters:
Name Type Argument Default Description
child any

The child to set the property value on.

key array

An array of strings that make up the property that will be set.

value any

The value that will be set.

operation integer <optional>
0

Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it.

force boolean <optional>
false

If force is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set.

Returns:
boolean -

True if the property was set, false if not.

Inherited From:
Source - core/Group.js, line 751

setRotation(min, max)

A more compact way of setting the angular velocity constraints of the particles.

Parameters:
Name Type Argument Default Description
min number <optional>
0

The minimum value for this range.

max number <optional>
0

The maximum value for this range.

Source - particles/arcade/Emitter.js, line 589

setScale(minX, maxX, minY, maxY, rate, ease, yoyo)

A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

Parameters:
Name Type Argument Default Description
minX number <optional>
1

The minimum value of Particle.scale.x.

maxX number <optional>
1

The maximum value of Particle.scale.x.

minY number <optional>
1

The minimum value of Particle.scale.y.

maxY number <optional>
1

The maximum value of Particle.scale.y.

rate number <optional>
0

The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size between the two.

ease number <optional>
Phaser.Easing.Linear.None

If you've set a rate > 0 this is the easing formula applied between the min and max values.

yoyo boolean <optional>
false

If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values)

Source - particles/arcade/Emitter.js, line 645

setSize(width, height)

A more compact way of setting the width and height of the emitter.

Parameters:
Name Type Description
width number

The desired width of the emitter (particles are spawned randomly within these dimensions).

height number

The desired height of the emitter.

Source - particles/arcade/Emitter.js, line 543

setStageReference(stage)

Sets the containers Stage reference. This is the Stage that this object, and all of its children, is connected to.

Parameters:
Name Type Description
stage PIXI.Stage

the stage that the container will have as its current stage reference

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 386

setXSpeed(min, max)

A more compact way of setting the X velocity range of the emitter.

Parameters:
Name Type Argument Default Description
min number <optional>
0

The minimum value for this range.

max number <optional>
0

The maximum value for this range.

Source - particles/arcade/Emitter.js, line 557

setYSpeed(min, max)

A more compact way of setting the Y velocity range of the emitter.

Parameters:
Name Type Argument Default Description
min number <optional>
0

The minimum value for this range.

max number <optional>
0

The maximum value for this range.

Source - particles/arcade/Emitter.js, line 573

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().

Parameters:
Name Type Argument Default Description
key string <optional>
'z'

The name of the property to sort on. Defaults to the objects z-depth value.

order integer <optional>
Phaser.Group.SORT_ASCENDING

Order ascending (SORT_ASCENDING) or descending (SORT_DESCENDING).

Inherited From:
Source - core/Group.js, line 1439

start(explode, lifespan, frequency, quantity, forceQuantity)

Call this function to start emitting particles.

Parameters:
Name Type Argument Default Description
explode boolean <optional>
true

Whether the particles should all burst out at once (true) or at the frequency given (false).

lifespan number <optional>
0

How long each particle lives once emitted in ms. 0 = forever.

frequency number <optional>
250

Ignored if Explode is set to true. Frequency is how often to emit 1 particle. Value given in ms.

quantity number <optional>
0

How many particles to launch. 0 = "all of the particles" which will keep emitting until Emitter.maxParticles is reached.

forceQuantity number <optional>
false

If true and creating a particle flow, the quantity emitted will be forced to the be quantity given in this call. This can never exceed Emitter.maxParticles.

Source - particles/arcade/Emitter.js, line 406

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 changed if the child is alive.

checkVisible boolean

If true the property will only be changed if the child is visible.

Inherited From:
Source - core/Group.js, line 1015

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:
Source - core/Group.js, line 530

swapChildren(child, child2)

Swaps the position of 2 Display Objects within this container.

Parameters:
Name Type Description
child PIXI.DisplayObject

-

child2 PIXI.DisplayObject

-

Inherited From:
Source - pixi/display/DisplayObjectContainer.js, line 133

toGlobal(position) → {PIXI.Point}

Calculates the global position of the display object

Parameters:
Name Type Description
position PIXI.Point

The world origin to calculate from

Returns:

A point object representing the position of this object

Inherited From:
Source - pixi/display/DisplayObject.js, line 616

toLocal(position, from) → {PIXI.Point}

Calculates the local position of the display object relative to another point

Parameters:
Name Type Argument Description
position PIXI.Point

The world origin to calculate from

from PIXI.DisplayObject <optional>

The DisplayObject to calculate the global position from

Returns:

A point object representing the position of this object

Inherited From:
Source - pixi/display/DisplayObject.js, line 630

update()

Called automatically by the game loop, decides when to launch particles and when to "die".

Source - particles/arcade/Emitter.js, line 248

updateCache()

Generates and updates the cached sprite for this object.

Inherited From:
Source - pixi/display/DisplayObject.js, line 606

<internal> updateZ()

Internal method that re-applies all of the childrens Z values.

This must be called whenever children ordering is altered so that their z indices are correctly updated.

Inherited From:
Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source - core/Group.js, line 426

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:
Source - core/Group.js, line 632
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Tue Jan 06 2015 06:32:06 GMT-0000 (GMT) using the DocStrap template.