public override void NetworkStart() { base.NetworkStart(); if (!IsServer) { enabled = false; } else { m_NetPortal = GameObject.FindGameObjectWithTag("GameNetPortal").GetComponent <GameNetPortal>(); m_ServerNetPortal = m_NetPortal.GetComponent <ServerGameNetPortal>(); m_NetPortal.ClientSceneChanged += OnClientSceneChanged; // retrieve the lobby state info so that the players we're about to spawn can query it var o = GameStateRelay.GetRelayObject(); if (o != null && o.GetType() != typeof(LobbyResults)) { throw new System.Exception("No LobbyResults found!"); } m_LobbyResults = (LobbyResults)o; DoInitialSpawnIfPossible(); } }
public override void NetworkStart() { base.NetworkStart(); if (!IsServer) { enabled = false; } else { bool won = (bool)GameStateRelay.GetRelayObject(); StartCoroutine(CoroSetWinLoss(won)); } }