Esempio n. 1
0
        public void Draw(SpriteBatch spriteBatch, SpriteFont gameFont, ContentManager content, GraphicsDeviceManager graphics)
        {
            StaticItem gameWinScreen = new StaticItem(Vector2.Zero);

            gameWinScreen.SpriteTexture = content.Load <Texture2D>("gameWin");

            graphics.GraphicsDevice.Clear(Color.Black);
            spriteBatch.Begin();
            spriteBatch.Draw(gameWinScreen.SpriteTexture, new Vector2(350, 300), Color.White);
            spriteBatch.DrawString(
                gameFont,
                "You completed the maze... but at what cost? " +
                "\n Press Enter to go deeper to the next level.",
                new Vector2(350, 150),
                Color.DarkKhaki);
            spriteBatch.End();
        }
Esempio n. 2
0
        public void Draw(SpriteBatch spriteBatch, SpriteFont gameFont, ContentManager content, GraphicsDeviceManager graphics)
        {
            StaticItem gameOverScreen = new StaticItem(Vector2.Zero);

            gameOverScreen.SpriteTexture = content.Load <Texture2D>("gameover");

            graphics.GraphicsDevice.Clear(Color.Black);
            spriteBatch.Begin();
            spriteBatch.Draw(gameOverScreen.SpriteTexture, new Vector2(280, 300), Color.White);
            spriteBatch.DrawString(
                gameFont,
                "\n You are dead! " +
                "\n Press Enter to restart.",
                new Vector2(500, 250),
                Color.DarkSeaGreen);
            spriteBatch.End();
        }
Esempio n. 3
0
        private void LoadLevelOne(ContentManager content)
        {
            this.background = new StaticItem(Vector2.Zero);
            this.background.SpriteTexture = content.Load <Texture2D>("background3");

            Texture2D playerMoves = content.Load <Texture2D>("bomberman");

            this.player = new Player(playerMoves, 4, 6, new Vector2(0, 310), new Vector2(10, 0), new Vector2(0, 10));
            this.player.NumberOfLives = 3;

            Texture2D badGirl = content.Load <Texture2D>("mele1");

            this.enemy = new Enemy(badGirl, 3, 3, new Vector2(520, 525), new Vector2(4, 0), new Vector2(0, 0));

            Texture2D doorLocked = content.Load <Texture2D>("doorLocked");
            Texture2D doorOpen   = content.Load <Texture2D>("doorOpen");

            this.exitDoor = new Door(doorOpen, 1, 4, new Vector2(250, 245));

            Texture2D keyAnim = content.Load <Texture2D>("key");

            this.key = new Key(keyAnim, 1, 3, new Vector2(666, 390));

            Texture2D bombAnim = content.Load <Texture2D>("bombanimation");

            this.bomb = new Bomb(bombAnim, 1, 5, new Vector2(100, 100));

            Texture2D moreBombsAnim = content.Load <Texture2D>("bombSathel");

            this.moreBombs = new PowerUpMoreBombs(moreBombsAnim, 1, 1, new Vector2(388, 180));

            // SpeedX,Y - this number must be bigger than the speed of the sprite for collision to work
            Texture2D balloonEnemyAnim = content.Load <Texture2D>("HeartStripBalloon");

            this.balloonEnemys.Add(new BalloonEnemy(balloonEnemyAnim, 4, 4, new Vector2(300, 182), new Vector2(2, 0), new Vector2(0, 2)));
            this.balloonEnemys.Add(new BalloonEnemy(balloonEnemyAnim, 4, 4, new Vector2(500, 462), new Vector2(2, 0), new Vector2(0, 2)));
            this.balloonEnemys.Add(new BalloonEnemy(balloonEnemyAnim, 4, 4, new Vector2(400, 362), new Vector2(2, 0), new Vector2(0, 2)));
            this.balloonEnemys.Add(new BalloonEnemy(balloonEnemyAnim, 4, 4, new Vector2(600, 1162), new Vector2(2, 0), new Vector2(0, 2)));
            this.balloonEnemys.Add(new BalloonEnemy(balloonEnemyAnim, 4, 4, new Vector2(900, 862), new Vector2(2, 0), new Vector2(0, 2)));
        }
Esempio n. 4
0
 private void LoadContent(ContentManager content)
 {
     this.backgrTree = new StaticItem(new Vector2(125, 125), new Vector2(50f, 50f), new Vector2(0, 10));
     this.backgrTree.SpriteTexture = content.Load <Texture2D>("Tree");
 }
Esempio n. 5
0
 private void LoadContent(ContentManager content)
 {
     this.title = new StaticItem(Vector2.Zero);
     this.title.SpriteTexture = content.Load <Texture2D>("monobomber");
 }