Physics.Arcade#sortTopBottom()

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

Please login to continue.