コード例 #1
0
 public void OnServerRequestGameStart(int delay)
 {
     if (DEBUG)
     {
         Debug.Log("OnGameIsReady");
     }
     if (_networkLobbyManager.IsReadyToBegin())
     {
         // begin countdown
         _innerProcess.MoveNext(Command.CountdownStart);
         OnStateUpdate();
         if (delay > 0)
         {
             _networkLobbyManager.AllClientsStartGameCountdown(delay);
             Invoke("BeginGame", delay);
         }
         else
         {
             BeginGame();
         }
     }
     else
     {
         Debug.LogError("Not all clients are ready. This means they haven't all loaded a mesh. try clicking 'load mesh' to force a reload");
     }
 }