示例#1
0
        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();
        }
示例#2
0
 private void HandlePlayerEliminated(Player player)
 {
     if (IsRoundOver())
     {
         // Invoke client first, otherwise UI will overlap
         RpcInvokeRoundOver(player.IsRightTeam);
         ServerRoundEnded?.Invoke(player.IsRightTeam);
     }
 }
示例#3
0
        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);
        }