Exemplo n.º 1
0
        protected override void LoadContent()
        {
            spriteBatch  = new SpriteBatch(GraphicsDevice);
            spriteFont   = content.Load <SpriteFont>("Fonts/Orbitron");
            screenText   = new ScreenText(spriteFont);
            shootingText = new ScreenText(spriteFont);
            Wumpus.Instance.setTexture(content.Load <Texture2D>("GameEntities/Wumpus"));
            SuperBats.Instance.setTexture(content.Load <Texture2D>("GameEntities/SuperBats"));
            Pit.Instance.setTexture(content.Load <Texture2D>("GameEntities/Pit"));
            player = new Player();
            player.Initialize(false);
            player.LoadContent(content);
            map = new Map();
            map.Generate(new int[, ] {
                { 2, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 10 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 },
                { 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 11 },
            }, 64);

            screenText.setText(player.CurrentRoom, map.Tunnels[player.CurrentRoom].RoomOne, map.Tunnels[player.CurrentRoom].RoomTwo, map.Tunnels[player.CurrentRoom].RoomThree, player.NumberArrows);
        }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            spriteFont  = content.Load <SpriteFont>("Fonts/Orbitron");
            player      = new Player();
            player.Initialize(true);
            player.LoadContent(content);

            background = new Background(content.Load <Texture2D>("Background/PitFall"));
            base.LoadContent();
        }