示例#1
0
        private void SetHighscoreInGUI()
        {
            uint?highscoreOfTrack = Highscores.GetHighscore(mActiveTrack.GetTrackId());

            if (highscoreOfTrack.HasValue)
            {
                xHighscore.Text = highscoreOfTrack.Value.ToString();
            }
            else
            {
                xHighscore.Text = "First Play";
            }
        }
示例#2
0
        private void HandleNrOfVectors4FinishedRace(uint nrOfVectors)
        {
            uint?highscoreOfTrack = Highscores.GetHighscore(mActiveTrack.GetTrackId());

            if (highscoreOfTrack.HasValue)
            {
                if (nrOfVectors < highscoreOfTrack.Value)
                {
                    // new highscore
                    HandleNewHighscore(nrOfVectors);
                }
            }
            else
            {
                // First playthrough -> new highscore
                HandleNewHighscore(nrOfVectors);
            }
        }