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"); } }
public void SetIsHero() { if (!lobbyPlayer.isHero) { CmdSetIsHero(true); } else { if (!LobbyManager.ContainsOverlord()) { // lobbyPlayer.isHero = false; CmdSetIsHero(false); } } }