5 using System.Collections.Generic;
 
   28         get { 
return _playerSlots; }
 
   36         get { 
return _playerSlots.Count(slot => slot != null); }
 
   44         get { 
return _playerSlots.Count(slot => slot != null && slot.IsHuman); }
 
   52         get { 
return _playerSlots.Count(slot => slot != null && slot.IsBot); }
 
   60         get { 
return _playerSlots.Count(slot => slot == null); }
 
   68         get { 
return _playerSlots.Where(slot => slot != null).ToArray(); }
 
   76         get { 
return _playerSlots.Where(slot => slot != null && slot.IsHuman).ToArray(); }
 
   84         get { 
return _playerSlots.Where(slot => slot != null && slot.IsBot).ToArray(); }
 
   92         get { 
return _playerSlots.Where(slot => slot == null).ToArray(); }
 
  100         get { 
return Players.Select<
MinigamePlayer, 
int>(slot => Array.IndexOf(_playerSlots, slot)).ToArray(); }
 
  126             List<int> emptySlotIndices = 
new List<int>();
 
  128             for (
int i = 0; i < _playerSlots.Length; i++)
 
  130                 if (_playerSlots[i] == null)
 
  131                     emptySlotIndices.Add(i);
 
  134             return emptySlotIndices.ToArray();
 
  151         get { 
return (from player in 
Players where player.
Avatar != null select player.Avatar).ToArray(); }
 
  159         get { 
return (from player in 
HumanPlayers where player.
Avatar != null select player.Avatar).ToArray(); }
 
  167         get { 
return (from player in 
BotPlayers where player.
Avatar != null select player.Avatar).ToArray(); }
 
  217             for (
int i = 0; i < _playerSlots.Length; i++)
 
  219                 if (_playerSlots[i] == null)
 
  230     public string ID = 
"players";
 
  254     internal void Initialize ()
 
  264         if (SlotColors.Length == 0)
 
  267         return SlotColors[slotIndex % SlotColors.Length];
 
  276         return PlayerAvatars.Select(a => a.GetComponent<T>()).ToArray();
 
  284         return HumanAvatars.Select(a => a.GetComponent<T>()).ToArray();
 
  292         return BotAvatars.Select(a => a.GetComponent<T>()).ToArray();
 
  297         if (_playerSlots[slotIndex] == null)
 
  299             _playerSlots[slotIndex] = player;
 
  309         return Array.IndexOf(_playerSlots, player);
 
  317         if (slotIndex >= MaxPlayers)
 
  320         return _playerSlots[slotIndex];
 
  325         if (player.
Team != 
this)
 
  332     internal void ClearPlayers ()
 
  334         for (
int i = 0; i < _playerSlots.Length; i++)
 
  336             var playerSlot = _playerSlots[i];
 
  338             if (playerSlot != null)
 
  340                 if (playerSlot.Avatar != null)
 
  343                 playerSlot.Team = null;
 
  346             _playerSlots[i] = null;
 
  355         if (SpawnPoints.Length == 0)
 
  358         return SpawnPoints[slotIndex % SpawnPoints.Length];
 
PlayerProfile[] HumanPlayerProfiles
Gets an array containing the profiles of all human players in this team. 
 
static void Despawn(GameObject go)
Despawn the given object. 
 
T[] GetBotAvatarComponents< T >()
Gets an array containing the components of type T on all bot player avatars. 
 
static Minigame Instance
Gets the sole instance of this minigame. 
 
GameObject[] BotAvatars
Gets an array containing the avatars of all bot players in this team. 
 
MinigamePlayer[] BotPlayers
Gets an array containing all bot players in this team. 
 
int SlotIndex
Gets the slot index of this player within its team. Returns -1 if the player is not assigned to any t...
 
int TeamIndex
Gets the index of this team within all available teams in this minigame. 
 
MinigameTeam Team
The team to which this player is assigned, if any. 
 
T[] GetHumanAvatarComponents< T >()
Gets an array containing the components of type T on all human player avatars. 
 
int FirstEmptySlotIndex
Gets the slot index of the first unoccupied player slot. 
 
int NumBotPlayers
Gets the number of bot players in this team. 
 
Tracks all information for a player in a minigame. 
 
int GetPlayerSlotIndex(MinigamePlayer player)
Gets the slot index of the given player. 
 
int NumHumanPlayers
Gets the number of human players in this team. 
 
GameObject[] PlayerAvatars
Gets an array containing the avatars of all players in this team (humans and bots). 
 
GameObject AvatarPrefab
The prefab to use for player avatars on this team. 
 
Color TeamColor
The official color of this team. Usage depends on interpretation. 
 
int[] PlayerSlotIndices
Gets an array containing the indices of all occupied player slots (whether by humans or bots) in this...
 
MinigamePlayer[] EmptySlots
Gets an array containing all unoccupied player slots in this team. 
 
Information about a minigame team. 
 
MinigamePlayer[] Players
Gets an array containing all players in this team (humans and bots). 
 
Color GetSlotColor(int slotIndex)
Gets the slot color of the player slot with the given slot index. 
 
MinigamePlayer[] PlayerSlots
Gets all player slots of this team. Null elements represent unoccupied slots. 
 
int MaxPlayers
The maximum player capacity of this team (humans and bots). 
 
MinigamePlayer GetPlayer(int slotIndex)
Gets the player in the player slot with the given slot index. 
 
bool IsFullOfHumans
Gets whether or not this team is full of human players. 
 
T[] GetPlayerAvatarComponents< T >()
Gets an array containing the components of type T on all player avatars (humans and bots)...
 
GameObject[] HumanAvatars
Gets an array containing the avatars of all human players in this team. 
 
int[] HumanPlayerSlotIndices
Gets an array containing the indices of all player slots occupied by human players in this team...
 
string[] HumanPlayerIDs
Gets an array containing the player IDs of all human players in this team. 
 
Transform[] SpawnPoints
The array of spawn points to use for player avatars on this team. 
 
int[] HumanPlayerPeerIndices
Gets an array containing the peer indices of all human players in this team. 
 
bool IsFull
Gets whether or not this team is full of players (humans and bots). 
 
int[] BotPlayerSlotIndices
Gets an array containing the indices of all player slots occupied by bot players in this team...
 
Stores data related to the player profile. Loads from a World Data file and provides runtime operatio...
 
MinigamePlayer[] HumanPlayers
Gets an array containing all human players in this team. 
 
string ID
The ID of this team. 
 
GameObject Avatar
The avatar of this player. Null if the player is not assigned to a team. 
 
int NumEmptySlots
Gets the number of unoccupied player slots in this team. 
 
Class for general minigame management. 
 
string[] HumanPlayerNicknames
Gets an array containing the nicknames of all human players in this team. 
 
int NumPlayers
Gets the number of players in this team (humans and bots). 
 
Color[] SlotColors
The player slot colors of this team. Usage depends on interpretation. 
 
Transform GetSpawnPoint(int slotIndex)
Gets the spawn point for the player slot at the given slot index. 
 
int[] EmptySlotIndices
Gets an array containing the indices of all unoccupied player slots in this team. ...
 
MinigameTeam[] Teams
All available teams in this minigame. 
 
This class server two main functions: 1) As a MonoBehaviour, it allows for network synchronization of...