OptionalMapper<T extends Component> class

Same as Mapper, except the [] operator returns T? instead of T and no getSafe method. For use in combination with Aspect.forOneOf.

Constructors

OptionalMapper(World world)
Create a Mapper for T in world.

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

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 and safe retrieval of a component for this entity. If the entity does not have this component then null is returned.