![]()  | 
  
    Liberi
    
   An exergame built for kids with CP! 
   | 
 
Class for general minigame management. More...
Inherits MonoBehaviour.
Public Member Functions | |
| delegate void | LocalPlayerAssignedHandler (MinigamePlayer localPlayer) | 
| MinigamePlayer | GetPlayer (string playerId) | 
| Get the minigame player with the given player index.  More... | |
| MinigamePlayer | GetPlayer (int peerIndex) | 
| Get the minigame player with the given peer index.  More... | |
| MinigamePlayer | GetPlayer (GameObject avatar) | 
| Get the minigame player with the given avatar.  More... | |
| MinigamePlayer | GetPlayer (Component component) | 
| Get the minigame player with the given avatar.  More... | |
| T[] | GetPlayerAvatarComponents< T > () | 
| Gets an array containing the components of type T on all player avatars (humans and bots).  More... | |
| T[] | GetHumanAvatarComponents< T > () | 
| Gets an array containing the components of type T on all human player avatars.  More... | |
| T[] | GetBotAvatarComponents< T > () | 
| Gets an array containing the components of type T on all bot player avatars.  More... | |
| MinigameTeam | GetTeam (string teamId) | 
| Get the minigame team with the given ID.  More... | |
| void | RequestPlayerAssign (string teamId) | 
| Requests a team assignment for the local player.  More... | |
| void | RequestPlayerUnassign () | 
| Requests a team unassignment for the local player.  More... | |
| GameObject | AssignPlayer (MinigamePlayer player, string teamId) | 
| Assign a player's team.  More... | |
| void | UnassignPlayer (MinigamePlayer player) | 
| Unassigns a minigame player from its current team. This will also despawn its avatar.  More... | |
| MinigamePlayer | AddBotPlayer (string teamId=null) | 
| Adds a new bot player to the minigame.  More... | |
| void | RemoveBotPlayer (MinigamePlayer player) | 
| Removes a bot player from the minigame. This will unassign the bot first.  More... | |
| void | Shutdown () | 
| Begin the minigame shutdown sequence. See ShutdownAsync.  More... | |
Public Attributes | |
| MinigameTeam[] | Teams | 
| All available teams in this minigame.  More... | |
Static Public Attributes | |
| static float | ShutdownDelay = 2f | 
| The amount of delay between initiating a server shutdown operation and the server process actually terminatiing.  More... | |
Properties | |
| static Minigame | Instance [get] | 
| Gets the sole instance of this minigame.  More... | |
| MinigameTeam | DefaultTeam [get] | 
| Gets the default team of this minigame. This is simply the first available team.  More... | |
| MinigamePlayer[] | Players [get] | 
| Gets an array containing all players in this minigame (humans and bots).  More... | |
| MinigamePlayer[] | HumanPlayers [get] | 
| Gets an array containing all human players in this minigame.  More... | |
| MinigamePlayer[] | BotPlayers [get] | 
| Gets an array containing all bot players in this minigame.  More... | |
| GameObject[] | PlayerAvatars [get] | 
| Gets an array containing the avatars for all players in this minigame (humans and bots).  More... | |
| GameObject[] | HumanAvatars [get] | 
| Gets an array containing the avatars for all human players in this minigame.  More... | |
| GameObject[] | BotAvatars [get] | 
| Gets an array containing the avatars for all bot players in this minigame.  More... | |
| int | NumPlayers [get] | 
| Gets the number of players in this minigame (humans and bots).  More... | |
| int | NumHumanPlayers [get] | 
| Gets the number of human players in this minigame.  More... | |
| int | NumBotPlayers [get] | 
| Gets the number of bot players in this minigame.  More... | |
| int[] | HumanPlayerPeerIndices [get] | 
| Gets an array containing the peer indices of all human players in this minigame.  More... | |
| string[] | HumanPlayerIDs [get] | 
| Gets an array containing the player IDs of all human players in this minigame.  More... | |
| PlayerProfile[] | HumanPlayerProfiles [get] | 
| Gets an array containing the profiles of all human players in this minigame.  More... | |
| string[] | HumanPlayerNicknames [get] | 
| Gets an array containing the nicknames of all human players in this minigame.  More... | |
| int | MaxPlayers [get] | 
| Gets the maximum player capacity of this minigame.  More... | |
| bool | IsFull [get] | 
| Gets whether or not this minigame is full of players (humans and bots).  More... | |
| bool | IsFullOfHumans [get] | 
| Gets whether or not this minigame is full of human players.  More... | |
| MinigamePlayer | LocalPlayer [get] | 
| If this is a game client, returns the local player.  More... | |
| GameObject | LocalAvatar [get] | 
| If this is a game client, returns the avatar of the local player.  More... | |
| String | ServerTime [get] | 
Events | |
| LocalPlayerAssignedHandler | LocalPlayerAssigned = delegate {} | 
Class for general minigame management.
Definition at line 12 of file Minigame.cs.
      
  | 
  inline | 
Adds a new bot player to the minigame.
| teamId | An optional team ID for the bot to join. If not provided, or null, bot joins default team. | 
Definition at line 496 of file Minigame.cs.
      
  | 
  inline | 
Assign a player's team.
| player | The player to assign. | 
| teamId | The ID of the team to which the player is to be assigned. | 
Call this on the server only.
Definition at line 405 of file Minigame.cs.
      
  | 
  inline | 
Gets an array containing the components of type T on all bot player avatars.
| T | : | Component | 
Definition at line 354 of file Minigame.cs.
      
  | 
  inline | 
Gets an array containing the components of type T on all human player avatars.
| T | : | Component | 
Definition at line 346 of file Minigame.cs.
      
  | 
  inline | 
Get the minigame player with the given player index.
Will always return a human player, if any.
Definition at line 277 of file Minigame.cs.
      
  | 
  inline | 
Get the minigame player with the given peer index.
Will always return a human player, if any.
Definition at line 291 of file Minigame.cs.
      
  | 
  inline | 
Get the minigame player with the given avatar.
Definition at line 304 of file Minigame.cs.
      
  | 
  inline | 
Get the minigame player with the given avatar.
Definition at line 321 of file Minigame.cs.
      
  | 
  inline | 
Gets an array containing the components of type T on all player avatars (humans and bots).
| T | : | Component | 
Definition at line 338 of file Minigame.cs.
      
  | 
  inline | 
Get the minigame team with the given ID.
Definition at line 362 of file Minigame.cs.
      
  | 
  inline | 
Removes a bot player from the minigame. This will unassign the bot first.
Definition at line 527 of file Minigame.cs.
      
  | 
  inline | 
Requests a team assignment for the local player.
| teamId | The ID of the team that the local player would like to join. | 
Call this on a client.
Definition at line 377 of file Minigame.cs.
      
  | 
  inline | 
Requests a team unassignment for the local player.
Call this on a client.
Definition at line 393 of file Minigame.cs.
      
  | 
  inline | 
Begin the minigame shutdown sequence. See ShutdownAsync.
Definition at line 552 of file Minigame.cs.
      
  | 
  inline | 
Unassigns a minigame player from its current team. This will also despawn its avatar.
Definition at line 471 of file Minigame.cs.
      
  | 
  static | 
The amount of delay between initiating a server shutdown operation and the server process actually terminatiing.
Definition at line 204 of file Minigame.cs.
| MinigameTeam [] Minigame.Teams | 
All available teams in this minigame.
Definition at line 211 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the avatars for all bot players in this minigame.
Definition at line 95 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing all bot players in this minigame.
Definition at line 71 of file Minigame.cs.
      
  | 
  get | 
Gets the default team of this minigame. This is simply the first available team.
Definition at line 42 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the avatars for all human players in this minigame.
Definition at line 87 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the player IDs of all human players in this minigame.
Definition at line 135 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the nicknames of all human players in this minigame.
Definition at line 151 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the peer indices of all human players in this minigame.
Definition at line 127 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the profiles of all human players in this minigame.
Definition at line 143 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing all human players in this minigame.
Definition at line 63 of file Minigame.cs.
      
  | 
  staticget | 
Gets the sole instance of this minigame.
Definition at line 30 of file Minigame.cs.
      
  | 
  get | 
Gets whether or not this minigame is full of players (humans and bots).
Definition at line 167 of file Minigame.cs.
      
  | 
  get | 
Gets whether or not this minigame is full of human players.
Definition at line 175 of file Minigame.cs.
      
  | 
  get | 
If this is a game client, returns the avatar of the local player.
Definition at line 191 of file Minigame.cs.
      
  | 
  get | 
If this is a game client, returns the local player.
Definition at line 183 of file Minigame.cs.
      
  | 
  get | 
Gets the maximum player capacity of this minigame.
Definition at line 159 of file Minigame.cs.
      
  | 
  get | 
Gets the number of bot players in this minigame.
Definition at line 119 of file Minigame.cs.
      
  | 
  get | 
Gets the number of human players in this minigame.
Definition at line 111 of file Minigame.cs.
      
  | 
  get | 
Gets the number of players in this minigame (humans and bots).
Definition at line 103 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing the avatars for all players in this minigame (humans and bots).
Definition at line 79 of file Minigame.cs.
      
  | 
  get | 
Gets an array containing all players in this minigame (humans and bots).
Definition at line 55 of file Minigame.cs.