public void EndRound() { if (!isServer) { return; } // if the round didn't even start we cancel the warmup if (warmingUp) { warmingUp = false; StopCoroutine(warmupCoroutine); } started = false; ServerRoundEnded?.Invoke(); CameraManager.singleton.playerCamera.gameObject.SetActive(false); CameraManager.singleton.lobbyCamera.gameObject.SetActive(true); StopCoroutine(tickCoroutine); SceneLoaderManager.singleton.UnloadSelectedMap(); RpcEndRound(); }
private void HandlePlayerEliminated(Player player) { if (IsRoundOver()) { // Invoke client first, otherwise UI will overlap RpcInvokeRoundOver(player.IsRightTeam); ServerRoundEnded?.Invoke(player.IsRightTeam); } }
public void RpcEndRound() { if (isServer) { return; } // if the round didn't even start we cancel the warmup if (warmingUp) { warmingUp = false; StopCoroutine(warmupCoroutine); } started = false; ServerRoundEnded?.Invoke(); StopCoroutine(tickCoroutine); SceneLoaderManager.singleton.UnloadSelectedMap(); StopCoroutine(tickCoroutine); }