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.

Inheritance

Constructors

PlayerManager()
Creates the PlayerManager.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
world World
The World where this manager resides.
no setterinherited

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 to player.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited