示例#1
0
 public void StartNewGame()
 {
     //Load in all rleavant info
     if (bSinglePlayer)
     {
         ClientScene.AddPlayer(0);
     }
     else
     {
         playerCheckIn++;
         if (NetworkLobbyManager.singleton != null && playerCheckIn < NetworkLobbyManager.singleton.numPlayers)
         {
             return;
         }
     }
     Players = GameObject.FindObjectsOfType <PlayerMomController>();
     if (bSinglePlayer)
     {
         Players[0].TeamColor = new Color(0.765f, 0.225f, 0.638f, 1f);
     }
     numPlayers = Players.Length + levelGen.bots;
     levelGen.Init();
     for (int t = 0; t < numPlayers; t++)
     {
         TeamSize.Add(0);
     }
     levelGen.PassInPlayers(Players);
     levelGen.Generate();
     hasGameStarted = true;
     SarlacInstance = levelGen.SarlacDude.GetComponent <SarlacController>();
     StartCoroutine(Release());
 }