Physics.Arcade#sort()

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)
doc_phaser
2017-02-14 10:59:08
Comments
Leave a Comment

Please login to continue.