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 code: core/Group.js (Line 1403)
Please login to continue.