TagManager class
If you need to tag any entity, use this. A typical usage would be to tag entities such as "PLAYER", "BOSS" or something that is very unique. An entity can only belong to one tag (0,1) at a time.
Constructors
- TagManager()
- Create the TagManager.
Properties
Methods
-
added(
int entity) → void -
Called when an
entity
is added to the world.inherited -
deleted(
int entity) → void -
Called when an
entity
is being deleted from the world.override -
destroy(
) → void -
Called when the world gets destroyed. Override if you need to clean up
your manager.
inherited
-
getEntity(
String tag) → int? -
Returns the entity with
tag
. -
getRegisteredTags(
) → Iterable< String> - Returns all known tags.
-
getTag(
int entity) → String? -
Returns the tag of the
entity
. -
initialize(
) → void -
Override to implement code that gets executed when managers are
initialized.
inherited
-
isRegistered(
String tag) → bool -
Returns
true
if there is an entity withtag
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
int entity, String tag) → void -
Register a
tag
to anentity
. -
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String tag) → void -
Unregister entity tagged with
tag
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited