API Docs for:
Show:

Managers.TeamManager Class

Module: Managers
Parent Module: ArtemiJS

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.

Methods

getPlayers

(
  • team
)
Utils.Bag

Parameters:

  • team String

    Name of the team

Returns:

Utils.Bag: Bag of players

getTeam

(
  • player
)
String

Parameters:

  • player String

    Name of the player

Returns:

String:

initialize

()

removeFromTeam

(
  • player
)

Parameters:

  • player String

    Name of the player

setTeam

(
  • player
  • team
)

Set team to a player

Parameters:

  • player String

    Name of the player

  • team String

    Name of the team

Properties

playersByTeam

Utils.HashMap private

teamByPlayer

Utils.HashMap private