예제 #1
0
파일: Game1.cs 프로젝트: Bonemind/pulsed
 public void DrawHighScore()
 {
     spriteBatch.DrawString(highscoreFont, "HIGHSCORES!", new Vector2(900, 200), Color.Black);
     Database conn = new Database();
     Dictionary<String, int> highscores = conn.getHighScores(20);
     conn.close();
     int currY = 250;
     foreach (KeyValuePair<string, int> currHighscore in highscores)
     {
         spriteBatch.DrawString(highscoreFont, currHighscore.Key.Remove(currHighscore.Key.Length - 1) + "- " + currHighscore.Value.ToString(), new Vector2(900, currY), Color.Black);
         currY += 31;
     }
     if (currKeyboardState.IsKeyDown(Keys.Back))
     {
         currState = State.main;
     }
 }