PlayerManager class
You may sometimes want to specify to which player an entity belongs to.
An entity can only belong to a single player at a time.
Constructors
- PlayerManager()
- Creates the PlayerManager.
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
-
getEntitiesOfPlayer(
String player) → Iterable< int> -
Returns all entities that belong to
player
. -
getPlayer(
int entity) → String? -
Returns the player associated with
entity
. -
initialize(
) → void -
Override to implement code that gets executed when managers are
initialized.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFromPlayer(
int entity) → void -
Removes
entity
from the player it is associated with. -
setPlayer(
int entity, String player) → void -
Make
entity
belong toplayer
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited