Beispiel #1
0
        /// <summary>
        /// </summary>
        /// <param name="gameplay"></param>
        public ResultScreen(GameplayScreen gameplay)
        {
            Gameplay       = gameplay;
            ResultsType    = ResultScreenType.Gameplay;
            ScoreProcessor = Gameplay.Ruleset.ScoreProcessor;

            InitializeIfGameplayType();
            ChangeDiscordPresence();
            View = new ResultScreenView(this);
        }
Beispiel #2
0
        /// <summary>
        /// </summary>
        /// <param name="replay"></param>
        public ResultScreen(Replay replay)
        {
            Replay         = replay;
            ResultsType    = ResultScreenType.Replay;
            ScoreProcessor = new ScoreProcessorKeys(replay);

            InitializeIfReplayType();
            ChangeDiscordPresence();

            View = new ResultScreenView(this);
        }
Beispiel #3
0
        /// <summary>
        /// </summary>
        /// <param name="score"></param>
        public ResultScreen(Score score)
        {
            Score       = score;
            ResultsType = ResultScreenType.Score;

            Replay         = score.ToReplay();
            ScoreProcessor = new ScoreProcessorKeys(Replay);

            InitializeIfScoreType();
            View = new ResultScreenView(this);
        }
Beispiel #4
0
        /// <summary>
        /// </summary>
        /// <param name="gameplay"></param>
        /// <param name="multiplayerScores"></param>
        /// <param name="multiplayerScreen"></param>
        public ResultScreen(GameplayScreen gameplay, List <ScoreboardUser> multiplayerScores = null, MultiplayerScreen multiplayerScreen = null)
        {
            Gameplay          = gameplay;
            ResultsType       = ResultScreenType.Gameplay;
            ScoreProcessor    = Gameplay.Ruleset.ScoreProcessor;
            MultiplayerScores = multiplayerScores;
            MultiplayerScreen = multiplayerScreen;

            InitializeIfGameplayType();
            ChangeDiscordPresence();

            if (MultiplayerScores != null)
            {
                Logger.Important($"Multiplayer Player Game Finished!", LogType.Network);

                MultiplayerScores.ForEach(x =>
                {
                    var modsString = "None";

                    try
                    {
                        modsString = ModHelper.GetModsString(x.Processor.Mods);
                    }
                    catch (Exception)
                    {
                        // ignored
                    }

                    Logger.Important($"{(x.UsernameRaw)}: {x.Processor.Score}, {x.Processor.Accuracy}, " +
                                     $"{x.Processor.TotalJudgementCount}, {x.RatingProcessor.CalculateRating(x.Processor)} | " +
                                     $"{modsString}", LogType.Network);
                });
            }

            View = new ResultScreenView(this);
            CacheMultiplayerScoreContainers();
        }