Phaser API Documentation

  Version: 

Member of: Phaser.Structs.List

sort(property, [handler])

Description:

Sort the contents of this List so the items are in order based on the given property. For example, sort('alpha') would sort the List contents based on the value of their alpha property.

Parameters:

name type arguments description
property string

The property to lexically sort by.

handler function <optional>

Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.

Returns:
Description:

This List object.

Examples:
Since: 3.0.0
Source: src/structs/List.js (Line 185)