GroupedArray
to use Sprite::context_index
and avoid using index_of
gamnit :: GroupedSprites :: defaultinit
gamnit $ GroupedSprites :: SELF
Type of this instance, automatically specialized in every classgamnit :: GroupedArray :: available=
List of available slotscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: GroupedSprites :: defaultinit
gamnit :: GroupedArray :: defaultinit
core :: Object :: defaultinit
gamnit :: GroupedArray :: defragment
Defragment and compress everything into a single chunks beginning at 0core :: 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 :: 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).
# Optimized `GroupedArray` to use `Sprite::context_index` and avoid using `index_of`
private class GroupedSprites
super GroupedArray[Sprite]
redef fun add(item)
do
var index = super
item.context_index = index
return index
end
redef fun remove(item) do remove_at(item, item.context_index)
end
lib/gamnit/flat/flat_core.nit:1718,1--1730,3