示例#1
0
 public void ButtonPressed(int b)
 {
     if (b >= 2 && b <= 5)
     {
         if (owner.localPlayer.team != b - 1)
         {
             team = b - 1;
             owner.localPlayer.SetTeam(b - 1);
             UpdateCircles();
         }
     }
     else if (b == 0) // Start match
     {
         print("Initiating multiplayer match");
         bool[] activeTeams = new bool[4];
         for (int i = 0; i < 4; i++)
         {
             activeTeams[i] = (teamPlayers[i + 1] > 0);
         }
         owner.InitiateMultiplayerMatch(activeTeams);
     }
     else if (b == 1) // Back
     {
         owner.BackButtonPressed();
     }
 }