Phaser API Documentation

  Version: 
sortGameObjects(gameObjects, pointer)

Description:

Given an array of Game Objects and a Pointer, sort the array and return it, so that the objects are in render order with the lowest at the bottom.

Parameters:

name type description
gameObjects Array.<Phaser.GameObjects.GameObject>

An array of Game Objects to be sorted.

pointer Phaser.Input.Pointer

The Pointer to check against the Game Objects.

Returns:
Description:

The sorted array of Game Objects.

Since: 3.0.0