class flixel.util.FlxSort

Available on all platforms

Helper class for sort() in FlxTypedGroup, but could theoretically be used on regular arrays as well.

Class Fields

static var ASCENDING:Int

static var DESCENDING:Int

static function byValues(Order:Int, Value1:Float, Value2:Float):Int

You can use this function as a backend to write a custom sorting function (see byY() for an example).

static function byY(Order:Int, Obj1:FlxObject, Obj2:FlxObject):Int

You can use this function in FlxTypedGroup.sort() to sort FlxObjects by their y values.