Пример #1
0
 /// <summary>
 /// Loads the content for inputspace
 /// </summary>
 public virtual void LoadContent(ContentManager content)
 {
     theBox          = content.Load <Texture2D>(Constant.TexBoxButton);
     font            = content.Load <SpriteFont>("Stat");
     scoreBackGround = content.Load <Texture2D>("ScoreScreen");
     BackGround      = content.Load <Texture2D>(Constant.menuBackGround);
     foreach (Highscore HS in highscores)
     {
         HS.LoadContent(content);
     }
     parsedText = ParseText(name);
 }
Пример #2
0
        /// <summary>
        /// get the top 10 highscores
        /// </summary>
        public void LoadScoreToScreen()
        {
            List <string> names  = new List <string>();
            List <int>    scores = new List <int>();
            List <int>    iDs    = new List <int>();

            string nameString = "select Name from highscores ORDER BY Score desc limit 10;";

            names = ReadFromDB(nameString, "Name");

            string scoresString = "select Score from highscores ORDER BY Score desc limit 10;";

            scores = ReadFromDB(scoresString, "Score", 1);

            for (int i = 0; i < names.Count; i++)
            {
                highscores.Add(new Highscore(names[i], scores[i]));
            }
            foreach (Highscore HS in highscores)
            {
                HS.LoadContent(GameWorld.Instance.Content);
            }
            scoresLoaded = true;
        }