Ejemplo n.º 1
0
        private void SetHighscoreInGUI()
        {
            uint?highscoreOfTrack = Highscores.GetHighscore(mActiveTrack.GetTrackId());

            if (highscoreOfTrack.HasValue)
            {
                xHighscore.Text = highscoreOfTrack.Value.ToString();
            }
            else
            {
                xHighscore.Text = "First Play";
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
 private void HandleNewHighscore(uint nrOfVectors)
 {
     Highscores.SaveHighscore(mActiveTrack.GetTrackId(), nrOfVectors);
     xHighscore.Text = nrOfVectors.ToString();
     SetStatusField(StateHelper.newHighscore);
 }