SpriteBatch#addAll()

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 code: core/Group.js (Line 1386)
doc_phaser
2017-02-14 11:11:18
Comments
Leave a Comment

Please login to continue.