コード例 #1
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            zombie = content.Load<Texture2D>("backgrounds\\menubackground");

            Texture2D norm = content.Load<Texture2D>("Buttons\\highscoresGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\highscoresbutton");
            highscoresButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 350));

            norm = content.Load<Texture2D>("Buttons\\newgameGlow");
            glow = content.Load<Texture2D>("Buttons\\newgamebutton");
            newGameButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 300));

            norm = content.Load<Texture2D>("Buttons\\helpButtonGlow");
            glow = content.Load<Texture2D>("Buttons\\helpButton");
            helpButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 400));

            norm = content.Load<Texture2D>("Buttons\\exitButtonGlow");
            glow = content.Load<Texture2D>("Buttons\\exitButton");
            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 450));

            mouse = new Mouse(content, "cursor");
            scream = content.Load<SoundEffect>("Sounds\\menuscream");
            click = content.Load<SoundEffect>("Sounds\\clicksound");

            if (play) scream.Play();
        }
コード例 #2
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            zombie = content.Load<Texture2D>("backgrounds\\title");
            title = content.Load<Texture2D>("backgrounds\\pause");
            Texture2D norm = content.Load<Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\continue");
            easyButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 300));

            norm = content.Load<Texture2D>("Buttons\\exitbuttonGlow");
            glow = content.Load<Texture2D>("Buttons\\exitbutton");
            hardButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 380));

            mouse = new Mouse(content, "cursor");
        }
コード例 #3
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load<SoundEffect>("Sounds\\clicksound");

            Texture2D norm = content.Load<Texture2D>("Buttons\\exitButtonGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\exitButton");
            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 510), sound);

            instructions = content.Load<Texture2D>("instructions");
            title = content.Load<Texture2D>("backgrounds\\instructions");
            background = content.Load<Texture2D>("backgrounds\\title");

            Texture2D playerTexture = content.Load<Texture2D>("manwalk");
            mouse = new Mouse(content, "cursor");
            player = new Player(playerTexture, mouse.texture, new Vector2(700, 500), content);
        }
コード例 #4
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            title         = content.Load <Texture2D>("backgrounds\\nameentry");
            confirm       = content.Load <SoundEffect>("Sounds\\confirm");
            buttonerror   = content.Load <SoundEffect>("Sounds\\error");
            buttonconfirm = content.Load <SoundEffect>("Sounds\\clicksound");
            error         = content.Load <SoundEffect>("Sounds\\cancel");
            font          = content.Load <SpriteFont>("Fonts\\Mono20");
            zombie        = content.Load <Texture2D>("backgrounds\\title");
            Texture2D norm = content.Load <Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load <Texture2D>("Buttons\\continue");

            contButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 500));


            mouse = new Mouse(content, "cursor");
        }
コード例 #5
0
        public override void LoadContent()
        {
            System.Threading.Thread.Sleep(100);

            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load<SoundEffect>("Sounds\\clicksound");

            zombie = content.Load<Texture2D>("backgrounds\\title");
            title = content.Load<Texture2D>("backgrounds\\modeselect");
            Texture2D norm = content.Load<Texture2D>("Buttons\\easymodeGLow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\easymode");
            easyButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 300), sound);

            norm = content.Load<Texture2D>("Buttons\\hardmodeGlow");
            glow = content.Load<Texture2D>("Buttons\\hardmode");
            hardButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 380), sound);

            mouse = new Mouse(content, "cursor");
        }
コード例 #6
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load <SoundEffect>("Sounds\\clicksound");

            Texture2D norm = content.Load <Texture2D>("Buttons\\exitButtonGlow");
            Texture2D glow = content.Load <Texture2D>("Buttons\\exitButton");

            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 510), sound);

            instructions = content.Load <Texture2D>("instructions");
            title        = content.Load <Texture2D>("backgrounds\\instructions");
            background   = content.Load <Texture2D>("backgrounds\\title");

            Texture2D playerTexture = content.Load <Texture2D>("manwalk");

            mouse  = new Mouse(content, "cursor");
            player = new Player(playerTexture, mouse.texture, new Vector2(700, 500), content);
        }
コード例 #7
0
        public override void LoadContent()
        {
            System.Threading.Thread.Sleep(100);
            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load <SoundEffect>("Sounds\\clicksound");
            levelCompleteSound = content.Load <SoundEffect>("sounds\\complete");

            background = content.Load <Texture2D>("backgrounds\\title");
            gameOver   = content.Load <Texture2D>("backgrounds\\levelcomplete");

            font = content.Load <SpriteFont>("spriteFont1");

            Texture2D norm = content.Load <Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load <Texture2D>("Buttons\\continue");

            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 520), sound);

            mouse = new Mouse(content, "cursor");

            levelCompleteSound.Play();
        }
コード例 #8
0
        public override void LoadContent()
        {
            System.Threading.Thread.Sleep(100);

            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load <SoundEffect>("Sounds\\clicksound");

            zombie = content.Load <Texture2D>("backgrounds\\title");
            title  = content.Load <Texture2D>("backgrounds\\modeselect");
            Texture2D norm = content.Load <Texture2D>("Buttons\\easymodeGLow");
            Texture2D glow = content.Load <Texture2D>("Buttons\\easymode");

            easyButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 300), sound);

            norm       = content.Load <Texture2D>("Buttons\\hardmodeGlow");
            glow       = content.Load <Texture2D>("Buttons\\hardmode");
            hardButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 380), sound);


            mouse = new Mouse(content, "cursor");
        }
コード例 #9
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;
            background = content.Load<Texture2D>("backgrounds\\title");
            if (got == gameOverType.GAMEOVER)
            {
                gameOver = content.Load<Texture2D>("zombie");
                sound = content.Load<SoundEffect>("Sounds//gameover");
                menuTitle = content.Load<Texture2D>("backgrounds\\gameover");
            }
            else
            {
                gameOver = content.Load<Texture2D>("backgrounds\\gamecomplete");
                menuTitle = content.Load<Texture2D>("backgrounds\\victory");
                sound = content.Load<SoundEffect>("Sounds//victory");
            }

            SoundEffect click = content.Load<SoundEffect>("Sounds\\ClickSound");
            Texture2D norm = content.Load<Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\continue");
            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 530), click);

            mouse = new Mouse(content, "cursor");

            if (sound != null )sound.Play();
        }
コード例 #10
0
        public override void LoadContent()
        {
            ContentManager content = ScreenManager.Game.Content;

            title = content.Load<Texture2D>("backgrounds\\nameentry");
            confirm = content.Load<SoundEffect>("Sounds\\confirm");
            buttonerror = content.Load<SoundEffect>("Sounds\\error");
            buttonconfirm = content.Load<SoundEffect>("Sounds\\clicksound");
            error = content.Load<SoundEffect>("Sounds\\cancel");
            font = content.Load<SpriteFont>("Fonts\\Mono20");
            zombie = content.Load<Texture2D>("backgrounds\\title");
            Texture2D norm = content.Load<Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\continue");
            contButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2), 500));

            mouse = new Mouse(content, "cursor");
        }
コード例 #11
0
        public override void LoadContent()
        {
            System.Threading.Thread.Sleep(100);
            ContentManager content = ScreenManager.Game.Content;

            sound = content.Load<SoundEffect>("Sounds\\clicksound");
            levelCompleteSound = content.Load<SoundEffect>("sounds\\complete");

            background = content.Load<Texture2D>("backgrounds\\title");
            gameOver = content.Load<Texture2D>("backgrounds\\levelcomplete");

            font = content.Load<SpriteFont>("spriteFont1");

            Texture2D norm = content.Load<Texture2D>("Buttons\\continueGlow");
            Texture2D glow = content.Load<Texture2D>("Buttons\\continue");
            exitButton = new MenuButton(glow, norm, new Vector2(800 / 2 - (norm.Width / 2) , 520), sound);

            mouse = new Mouse(content, "cursor");

            levelCompleteSound.Play();
        }
コード例 #12
0
        public override void LoadContent()
        {
            System.Threading.Thread.Sleep(100);

            ContentManager content = ScreenManager.Game.Content;

            Texture2D norm = content.Load<Texture2D>("buttons\\exitbuttonGlow");
            Texture2D glow = content.Load<Texture2D>("buttons\\exitbutton");
            SoundEffect sound = content.Load<SoundEffect>("sounds\\clicksound");

            exitButton = new MenuButton(glow,norm,new Vector2((800 / 2) - (norm.Width / 2),530), sound);
            mouse = new Mouse(content, "cursor");
            zombie = content.Load<Texture2D>("Backgrounds\\title");
            banner = content.Load<Texture2D>("Backgrounds\\highscores");
        }