Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            enemy.Add(new Enemy(Content.Load<Texture2D>("Sword"), new Vector2(1100, 345)));
            character = new Character(Content.Load<Texture2D>("Character Boy"), new Vector2(300, 345));
            mouseTex = new MouseTex(Content.Load<Texture2D>("mouse"));

              /*  for (int i = 0; i <= 20; i++)
            {

                gem.Add(new Gem(Content.Load<Texture2D>("Gem Blue"), new Rectangle(gemSpace, randPos, 100, 100)));
                gemSpace += 100;
            }*/

            for (int i = 0; i <= 10; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpace, -50, 1000, 1000)));
                lvlSpace += 1000;
            }
            for (int i = 0; i <= 10; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpaceTop, -1050, 1000, 1000)));
                lvlSpaceTop += 1000;
            }

            for (int i = 0; i <= 10; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpaceBottom, 950, 1000, 1000)));
                lvlSpaceBottom += 1000;
            }

            heart[0] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 50, 100, 100));
            heart[1] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 100, 100, 100));
            heart[2] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 150, 100, 100));
            heart[3] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 200, 100, 100));
            heart[4] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 250, 100, 100));

            hud = new HUD();
            hud.Font = Content.Load<SpriteFont>("Arial");
        }
Exemple #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            enemy.Add(new Enemy(Content.Load<Texture2D>("Sword"), new Vector2(1100, 345)));
            character = new Character(Content.Load<Texture2D>("Character Boy"), new Vector2(300, 345));
            player2 = new Player2(Content.Load<Texture2D>("Character Pink Girl"), new Vector2(300, 445));
            mouseTex = new MouseTex(Content.Load<Texture2D>("mouse"));

            for (int i = 0; i <= 5; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpace, -50, 1000, 1000)));
                lvlSpace += 1000;
            }
            for (int i = 0; i <= 5; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpaceTop, -1050, 1000, 1000)));
                lvlSpaceTop += 1000;
            }

            for (int i = 0; i <= 5; i++)
            {

                level.Add(new Level(Content.Load<Texture2D>("riffled-background"), new Rectangle(lvlSpaceBottom, 950, 1000, 1000)));
                lvlSpaceBottom += 1000;
            }

            heart[0] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 50, 100, 100));
            heart[1] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 100, 100, 100));
            heart[2] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 150, 100, 100));
            heart[3] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 200, 100, 100));
            heart[4] = new Heart(Content.Load<Texture2D>("Heart"), new Rectangle(50, 250, 100, 100));

            Player2Heart[0] = new Player2Hearts(Content.Load<Texture2D>("Heart"), new Rectangle(500, 50, 100, 100));
            Player2Heart[1] = new Player2Hearts(Content.Load<Texture2D>("Heart"), new Rectangle(500, 100, 100, 100));
            Player2Heart[2] = new Player2Hearts(Content.Load<Texture2D>("Heart"), new Rectangle(500, 150, 100, 100));
            Player2Heart[3] = new Player2Hearts(Content.Load<Texture2D>("Heart"), new Rectangle(500, 200, 100, 100));
            Player2Heart[4] = new Player2Hearts(Content.Load<Texture2D>("Heart"), new Rectangle(500, 250, 100, 100));

            hud = new HUD();
            hud.Font = Content.Load<SpriteFont>("Arial");
            player1win = new Player1Win();
            player1win.Font = Content.Load<SpriteFont>("Win");

            player2win = new Player2Win();
            player2win.Font = Content.Load<SpriteFont>("Win");
        }