SpriteContext
by their draw_order
gamnit $ DrawOrderComparator :: SELF
Type of this instance, automatically specialized in every classcore :: Comparator :: bubble_sort
Bubble-sortarray
between from
and to
indices
core :: Comparator :: build_heap
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Comparator :: defaultinit
core :: Comparator :: insertion_sort
Insertion-sortarray
between from
and to
indices
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Comparator :: merge_sort
Merge-sortarray
between from
and to
indices
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Comparator :: quick_sort
Quick-sortarray
between from
and to
indices
# Sort `SpriteContext` by their `draw_order`
private class DrawOrderComparator
super Comparator
# This class can't set COMPARED because
# `the public property cannot contain the private type...`
#redef type COMPARED: SpriteContext
# Require: `a isa SpriteContext and b isa SpriteContext`
redef fun compare(a, b)
do return a.as(SpriteContext).draw_order <=> b.as(SpriteContext).draw_order
end
lib/gamnit/flat/flat_core.nit:1755,1--1766,3