private void EndRound()
 {
     _gameTicker.EndRound();
     _chatManager.DispatchServerAnnouncement($"Restarting in 10 seconds.");
     _checkTimerCancel.Cancel();
     Timer.Spawn(TimeSpan.FromSeconds(10), () => _gameTicker.RestartRound());
 }
        private void EndRound(Victory victory)
        {
            string text;

            switch (victory)
            {
            case Victory.Innocents:
                text = Loc.GetString("The innocents have won!");
                break;

            case Victory.Traitors:
                text = Loc.GetString("The traitors have won!");
                break;

            default:
                text = Loc.GetString("Nobody wins!");
                break;
            }

            _gameTicker.EndRound(text);

            var restartDelay = 10;

            _chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting in {0} seconds.", restartDelay));
            _checkTimerCancel.Cancel();

            Timer.Spawn(TimeSpan.FromSeconds(restartDelay), () => _gameTicker.RestartRound());
        }
示例#3
0
        private void EndRound()
        {
            OnRoundEndCountdownFinished?.Invoke();
            _gameTicker.EndRound();

            _chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting the round in {0} seconds...", RestartRoundTime));

            Timer.Spawn(TimeSpan.FromSeconds(RestartRoundTime), () => _gameTicker.RestartRound(), CancellationToken.None);
        }
示例#4
0
        private void EndRound(Victory victory)
        {
            string text;

            switch (victory)
            {
            case Victory.Innocents:
                text = "The innocents have won!";
                break;

            case Victory.Traitors:
                text = "The traitors have won!";
                break;

            default:
                text = "Nobody wins!";
                break;
            }

            _gameTicker.EndRound(text);
            _chatManager.DispatchServerAnnouncement($"Restarting in 10 seconds.");
            _checkTimerCancel.Cancel();
            Timer.Spawn(TimeSpan.FromSeconds(10), () => _gameTicker.RestartRound());
        }
示例#5
0
 private void EndRound()
 {
     OnRoundEndCountdownFinished?.Invoke();
     _gameTicker.EndRound();
 }