sortTopBottom(a, b) → {integer}
A Sort function for sorting two bodies based on a TOP to BOTTOM sort direction.
This is called automatically by World.sort
Parameters
Name | Type | Description |
---|---|---|
a | Phaser.Sprite | The first Sprite to test. The Sprite must have an Arcade Physics Body. |
b | Phaser.Sprite | The second Sprite to test. The Sprite must have an Arcade Physics Body. |
Returns
integer -
A negative value if a > b
, a positive value if a < b
or 0 if a === b
or the bodies are invalid.
- Source code: physics/arcade/World.js (Line 476)
Please login to continue.