Example #1
0
        //Add all text.
        public ScoreManager(HighScoreClass _highScores, ContentManager content)
        {
            places     = new List <TextLine>();
            scores     = new List <TextLine>();
            names      = new List <TextLine>();
            highScores = _highScores;

            input = new TextLine("Font", "Input name: " + name + "|", Color.White, new Vector2(0, 0));

            places.Add(new TextLine("Font", "1st", Color.White, new Vector2(textSpaceX, textSpaceY * 1)));
            places.Add(new TextLine("Font", "2nd", Color.White, new Vector2(textSpaceX, textSpaceY * 2)));
            places.Add(new TextLine("Font", "3rd", Color.White, new Vector2(textSpaceX, textSpaceY * 3)));

            for (int i = 0; i < 10; i++)
            {
                if (i > 2)
                {
                    places.Add(new TextLine("Font", (i + 1).ToString() + "th", Color.White, new Vector2(50, textSpaceY + textSpaceY * i)));
                }
                scores.Add(new TextLine("Font", "", Color.White, new Vector2(textSpaceX * 3, textSpaceY + textSpaceY * i)));
                names.Add(new TextLine("Font", "", Color.White, new Vector2(textSpaceX * 6, textSpaceY + textSpaceY * i)));
            }

            //Get the score from the files.
            GetScore();
        }
Example #2
0
        //Add all text.
        public ScoreManager(HighScoreClass _highScores, ContentManager content)
        {
            places = new List<TextLine>();
            scores = new List<TextLine>();
            names = new List<TextLine>();
            highScores = _highScores;

            input = new TextLine("Font", "Input name: " + name + "|", Color.White, new Vector2(0, 0));

            places.Add(new TextLine("Font", "1st", Color.White, new Vector2(textSpaceX, textSpaceY * 1)));
            places.Add(new TextLine("Font", "2nd", Color.White, new Vector2(textSpaceX, textSpaceY * 2)));
            places.Add(new TextLine("Font", "3rd", Color.White, new Vector2(textSpaceX, textSpaceY * 3)));

            for (int i = 0; i < 10; i++)
            {
                if (i > 2)
                {
                    places.Add(new TextLine("Font", (i + 1).ToString() + "th", Color.White, new Vector2(50, textSpaceY + textSpaceY * i)));
                }
                scores.Add(new TextLine("Font", "", Color.White, new Vector2(textSpaceX * 3, textSpaceY + textSpaceY * i)));
                names.Add(new TextLine("Font", "", Color.White, new Vector2(textSpaceX * 6, textSpaceY + textSpaceY * i)));
            }

            //Get the score from the files.
            GetScore();
        }
Example #3
0
        //Load width/height, load the scoreboard, set up the managers.
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            width  = graphics.GraphicsDevice.Viewport.Width;
            height = graphics.GraphicsDevice.Viewport.Height;

            GraphicalObject.main = this;

            highScore = new HighScoreClass(Content);

            highScore.LoadScores();
            highScore.SetScores();

            gameManager  = new GameManager(width, height, Content);
            menuManager  = new MenuManager(width, height, Content);
            scoreManager = new ScoreManager(highScore, Content);

            //highScore.NewScore(100000, "Someone");
        }
Example #4
0
        //Load width/height, load the scoreboard, set up the managers.
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            width = graphics.GraphicsDevice.Viewport.Width;
            height = graphics.GraphicsDevice.Viewport.Height;

            GraphicalObject.main = this;

            highScore = new HighScoreClass(Content);

            highScore.LoadScores();
            highScore.SetScores();

            gameManager = new GameManager(width, height, Content);
            menuManager = new MenuManager(width, height, Content);
            scoreManager = new ScoreManager(highScore, Content);

            //highScore.NewScore(100000, "Someone");
        }