sort(group, sortDirection)
This method will sort a Groups hash array.
If the Group has physicsSortDirection set it will use the sort direction defined.
Otherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.
By changing Group.physicsSortDirection you can customise each Group to sort in a different order.
Parameters
| Name | Type | Argument | Description | 
|---|---|---|---|
group |  Phaser.Group | The Group to sort.  |  |
sortDirection |  integer |  <optional> |  The sort direction used to sort this Group.  |  
- Source code: physics/arcade/World.js (Line 518)
 
Please login to continue.