TeamManager class

Use this class together with PlayerManager.

You may sometimes want to create teams in your game, so that some players are team mates.

A player can only belong to a single team.

Inheritance

Constructors

TeamManager()
Create a TeamManager.

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.
inherited
destroy() → void
Called when the world gets destroyed. Override if you need to clean up your manager.
inherited
getPlayers(String team) Iterable<String>
Returns all players of team.
getTeam(String player) String?
Returns the team of player.
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
removeFromTeam(String player) → void
Removes player from their team.
setTeam(String player, String team) → void
Set the team of player.
toString() String
A string representation of this object.
inherited

Operators

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