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