示例#1
0
    public override void OnLobbyServerPlayersReady()
    {
        if (LobbyManager.ContainsOverlord())
        {
            bool _allReady = true;
            foreach (LobbyPlayer _player in lobbySlots)
            {
                if (_player != null && !_player.readyToBegin)
                {
                    _allReady = false;
                }
            }
            if (_allReady)
            {
                foreach (LobbyPlayer _lobbyPlayer in lobbySlots)
                {
                    if (_lobbyPlayer != null)
                    {
                        connectedLobbyPlayers++;
                    }
                }

                Destroy(GetComponent <NetworkGUIManager>());

                gameStarted = true;

                base.OnLobbyServerPlayersReady();
            }
        }
        else
        {
            Debug.Log("No Overlord in game");
        }
    }
示例#2
0
 public void SetIsHero()
 {
     if (!lobbyPlayer.isHero)
     {
         CmdSetIsHero(true);
     }
     else
     {
         if (!LobbyManager.ContainsOverlord())
         {
             //  lobbyPlayer.isHero = false;
             CmdSetIsHero(false);
         }
     }
 }