예제 #1
0
        public SongLengthCalculator()
        {
            SongLengthCalculator.songDataHolder     = UnityEngine.Object.FindObjectOfType <SongDataHolder>();
            SongLengthCalculator.songCues           = UnityEngine.Object.FindObjectOfType <SongCues>();
            SongLengthCalculator.scoreKeeperDisplay = UnityEngine.Object.FindObjectOfType <ScoreKeeperDisplay>();

            this.Precalc();
        }
예제 #2
0
        public static void ScoreKeeperDisplayUpdate(ScoreKeeperDisplay scoreKeeperDisplay)
        {
            if (!KataConfig.I.practiceMode)
            {
                int   score      = ScoreKeeper.I.mScore;
                float percentage = GetScorePercentage(selectedSong, score, KataConfig.I.GetDifficulty());

                //Make pretty-ish strings
                string scoreString      = "<size=" + inGameCurrentScoreSize + ">" + String.Format("{0:n0}", score).Replace(",", " ") + "</size>";
                string percentageString = "<size=" + inGameCurrentPercentSize + "> (" + String.Format("{0:0.00}", percentage) + "%)</size>";

                scoreKeeperDisplay.scoreDisplay.text = scoreString + percentageString;

                HighScoreRecords.HighScoreInfo highScoreInfo = HighScoreRecords.GetHighScore(selectedSong);
                float highScore           = Convert.ToSingle(highScoreInfo.score);
                float highScorePercentage = GetHighScorePercentage(selectedSong);

                string highScoreString           = "<size=" + inGameHighScoreSize + ">" + String.Format("{0:n0}", highScore).Replace(",", " ") + "</size>";
                string highScorePercentageString = "<size=" + inGamePercentSize + "> (" + String.Format("{0:0.00}", highScorePercentage) + "%)</size>";

                scoreKeeperDisplay.highScoreDisplay.text = "<size=" + inGameHighScoreLabelSize + ">" + inGameHighScoreLabelText + "</size>" + highScoreString + highScorePercentageString;
            }
        }
예제 #3
0
 private static void Postfix(ScoreKeeperDisplay __instance)
 {
     AudicaMod.ScoreKeeperDisplayUpdate(__instance);
 }