Mapper<T extends Component> class
High performance component retrieval from entities. Use this wherever you need to retrieve components from entities often and fast.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getSafe(
int entity) → T? - Fast and safe retrieval of a component for this entity. If the entity does not have this component then null is returned.
-
has(
int entity) → bool - Checks if the entity has this type of component.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int entity) → T - Fast but unsafe retrieval of a component for this entity. No bounding checks, so this could throw a RangeError, however in most scenarios you already know the entity possesses this component.