Example #1
0
        public void LoadContent()
        {
            messageFont      = mainGame.Content.Load <SpriteFont>("TimesNewRoman");
            deathScreamSound = mainGame.Content.Load <SoundEffect>("chewScream");
            fallScreamSound  = mainGame.Content.Load <SoundEffect>("deathScream1");

            Texture2D   darwinTex       = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");
            Texture2D   darwinUpTex     = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinUp");
            Texture2D   darwinDownTex   = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");
            Texture2D   darwinRightTex  = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinRight");
            Texture2D   darwinLeftTex   = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinLeft");
            Texture2D   zombieDarwinTex = mainGame.Content.Load <Texture2D>("DarwinPic/ZombieDarwin");
            Texture2D   deadDarwinText  = mainGame.Content.Load <Texture2D>("DarwinPic/DeadDarwin");
            SoundEffect transformSound  = mainGame.Content.Load <SoundEffect>("transform");

            darwin.LoadContent(graphics.GraphicsDevice, darwinUpTex, darwinDownTex,
                               darwinRightTex, darwinLeftTex, zombieDarwinTex, deadDarwinText, transformSound);


            gameOverTexture = mainGame.Content.Load <Texture2D>("gameover");
            gameWinTexture  = mainGame.Content.Load <Texture2D>("gamewin");
            Texture2D menuBarTexture = mainGame.Content.Load <Texture2D>("menubar");

            stairs.LoadContent(mainGame.Content.Load <Texture2D>("StaticPic/stairsUp"),
                               mainGame.Content.Load <Texture2D>("StaticPic/stairsDown"), "Down");

            SoundEffect switchSound = mainGame.Content.Load <SoundEffect>("switch");

            firstSwitch.LoadContent(mainGame.Content.Load <Texture2D>("StaticPic/Wall"),
                                    mainGame.Content.Load <Texture2D>("StaticPic/Switch"), switchSound);

            brain.LoadContent(mainGame.Content.Load <Texture2D>("brain"));

            board.LoadContent(mainGame.Content.Load <Texture2D>("StaticPic/metal_tile"));
            board.LoadBackgroundContent(mainGame.Content.Load <Texture2D>("StaticPic/side_wall"));
            board.loadMenuBar(menuBarTexture);

            wallTex = mainGame.Content.Load <Texture2D>("StaticPic/side_wall");


            //darwin.LoadContent(graphics.GraphicsDevice, darwinTex, zombieDarwinTex);

            firstZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));
            secondZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));
            thirdZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));
            fourthZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));
            fifthZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));
            sixthZombie.LoadContent(mainGame.Content.Load <Texture2D>("ZombiePic/Zombie"), mainGame.Content.Load <Texture2D>("ZombieSkull"));

            zombieMessage.LoadContent(mainGame.Content.Load <Texture2D>("messageBox"));
            darwinMessage.LoadContent(mainGame.Content.Load <Texture2D>("messageBox"));
            switchMessage.LoadContent(mainGame.Content.Load <Texture2D>("messageBox"));
            brainMessage.LoadContent(mainGame.Content.Load <Texture2D>("messageBox"));

            gameStart.LoadContent(mainGame.Content.Load <Texture2D>("SplashScreens/Intro2"));
            gameStart2.LoadContent(mainGame.Content.Load <Texture2D>("SplashScreens/Intro2"));
            zTime.LoadContent(mainGame.Content.Load <Texture2D>("humanities_bar"));
            vortex.LoadContent(mainGame.Content.Load <Texture2D>("vortex"));
            potion.LoadContent(mainGame.Content.Load <Texture2D>("StaticPic/potion"), mainGame.Content.Load <SoundEffect>("potion"));
        }
Example #2
0
        public void LoadContent()
        {
            messageFont = mainGame.Content.Load <SpriteFont>("TimesNewRoman");

            deathScreamSound = mainGame.Content.Load <SoundEffect>("chewScream");

            Texture2D darwinTex = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");

            Texture2D darwinUpTex     = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinUp");
            Texture2D darwinDownTex   = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");
            Texture2D darwinRightTex  = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinRight");
            Texture2D darwinLeftTex   = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinLeft");
            Texture2D zombieDarwinTex = mainGame.Content.Load <Texture2D>("DarwinPic/ZombieDarwin");
            Texture2D deadDarwinTex   = mainGame.Content.Load <Texture2D>("DarwinPic/DeadDarwin");

            Texture2D zombieTex  = mainGame.Content.Load <Texture2D>("ZombiePic/Zombie");
            Texture2D messagePic = mainGame.Content.Load <Texture2D>("messageBox");

            Texture2D zombieFastTex = mainGame.Content.Load <Texture2D>("ZombiePic/FastZombie");
            Texture2D wholeLeafTex  = mainGame.Content.Load <Texture2D>("leaf");
            Texture2D brokeLeafTex  = mainGame.Content.Load <Texture2D>("brokenleaf");

            // Test
            Texture2D basicGridTex = mainGame.Content.Load <Texture2D>("StaticPic/Level3/metal_tile_light");
            Texture2D basicMenuTex = mainGame.Content.Load <Texture2D>("StaticPic/Level3/side_wall_yellow");

            Texture2D basicStairUpTex   = mainGame.Content.Load <Texture2D>("StaticPic/stairsUp");
            Texture2D basicStairDownTex = mainGame.Content.Load <Texture2D>("StaticPic/stairsDown");

            // Texture for the wall and switch
            Texture2D wallTex   = mainGame.Content.Load <Texture2D>("StaticPic/Wall");
            Texture2D switchTex = mainGame.Content.Load <Texture2D>("StaticPic/Switch");

            Texture2D brainTex       = mainGame.Content.Load <Texture2D>("brain");
            Texture2D menuBarTexture = mainGame.Content.Load <Texture2D>("menubar");

            gameOverTexture = mainGame.Content.Load <Texture2D>("gameover");
            gameWinTexture  = mainGame.Content.Load <Texture2D>("gamewin");

            secondStair.LoadContent(basicStairUpTex, basicStairDownTex, "Down");

            SoundEffect switchSound = mainGame.Content.Load <SoundEffect>("switch");

            firstSwitch.LoadContent(wallTex, switchTex, switchSound);
            secondSwitch.LoadContent(wallTex, switchTex, switchSound);

            brain.LoadContent(brainTex);

            board.LoadContent(basicGridTex);
            board.LoadBackgroundContent(basicMenuTex);
            board.loadMenuBar(menuBarTexture);

            SoundEffect transformSound = mainGame.Content.Load <SoundEffect>("transform");

            darwin.LoadContent(graphics.GraphicsDevice, darwinUpTex, darwinDownTex,
                               darwinRightTex, darwinLeftTex, zombieDarwinTex, deadDarwinTex, transformSound);

            firstZombie.LoadContent(zombieTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));

            fastZombie1.LoadContent(zombieFastTex);

            SoundEffect leafSound = mainGame.Content.Load <SoundEffect>("leaves");

            // load leaf texture for all leaves
            foreach (Leaf leaf in this.leaves)
            {
                leaf.LoadContent(brokeLeafTex, wholeLeafTex, leafSound);
            }

            zombieMessage.LoadContent(messagePic);
            darwinMessage.LoadContent(messagePic);
            switchMessage.LoadContent(messagePic);
            brainMessage.LoadContent(messagePic);
            fastMessage.LoadContent(messagePic);

            gameStart.LoadContent(mainGame.Content.Load <Texture2D>("SplashScreens/Level3"));

            zTime.LoadContent(mainGame.Content.Load <Texture2D>("humanities_bar"));
        }
Example #3
0
        public void LoadContent()
        {
            messageFont = mainGame.Content.Load <SpriteFont>("TimesNewRoman");

            deathScreamSound = mainGame.Content.Load <SoundEffect>("chewScream");
            revealSound      = mainGame.Content.Load <SoundEffect>("reveal");

            Texture2D darwinTex = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");

            Texture2D darwinUpTex     = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinUp");
            Texture2D darwinDownTex   = mainGame.Content.Load <Texture2D>("DarwinPic/Darwin");
            Texture2D darwinRightTex  = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinRight");
            Texture2D darwinLeftTex   = mainGame.Content.Load <Texture2D>("DarwinPic/DarwinLeft");
            Texture2D zombieDarwinTex = mainGame.Content.Load <Texture2D>("DarwinPic/ZombieDarwin");
            Texture2D deadDarwinTex   = mainGame.Content.Load <Texture2D>("DarwinPic/DeadDarwin");

            Texture2D zombieTex   = mainGame.Content.Load <Texture2D>("ZombiePic/Zombie");
            Texture2D cannibalTex = mainGame.Content.Load <Texture2D>("ZombiePic/CannibalZombie");
            Texture2D messagePic  = mainGame.Content.Load <Texture2D>("messageBox");

            Texture2D basicGridTex = mainGame.Content.Load <Texture2D>("StaticPic/Level2/metal_tile_dark");
            Texture2D basicMenuTex = mainGame.Content.Load <Texture2D>("StaticPic/Level2/side_wall_green");

            Texture2D basicStairUpTex   = mainGame.Content.Load <Texture2D>("StaticPic/stairsUp");
            Texture2D basicStairDownTex = mainGame.Content.Load <Texture2D>("StaticPic/stairsDown");
            Texture2D menuBarTexture    = mainGame.Content.Load <Texture2D>("menubar");

            removableWallTex = mainGame.Content.Load <Texture2D>("StaticPic/Wall");

            wallTex = mainGame.Content.Load <Texture2D>("StaticPic/Level2/side_wall_green");

            gameOverTexture = mainGame.Content.Load <Texture2D>("gameover");
            gameWinTexture  = mainGame.Content.Load <Texture2D>("gamewin");

            stairs.LoadContent(basicStairUpTex, basicStairDownTex, "Down");

            board.LoadContent(basicGridTex);
            board.LoadBackgroundContent(basicMenuTex);
            board.loadMenuBar(menuBarTexture);

            SoundEffect transformSound = mainGame.Content.Load <SoundEffect>("transform");
            SoundEffect eatSound       = mainGame.Content.Load <SoundEffect>("OmNom");

            darwin.LoadContent(graphics.GraphicsDevice, darwinUpTex, darwinDownTex,
                               darwinRightTex, darwinLeftTex, zombieDarwinTex, deadDarwinTex, transformSound);
            firstZombie.LoadContent(zombieTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));
            secondZombie.LoadContent(zombieTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));
            thirdZombie.LoadContent(zombieTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));
            fourthZombie.LoadContent(zombieTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));
            cannibalZombie.LoadContent(cannibalTex, mainGame.Content.Load <Texture2D>("ZombieSkull"));
            cannibalZombie.LoadContent(cannibalTex, eatSound);

            zombieMessage.LoadContent(messagePic);
            darwinMessage.LoadContent(messagePic);
            cannibalMessage.LoadContent(messagePic);

            cannibalZombie.eatSound = eatSound;

            gameStart.LoadContent(mainGame.Content.Load <Texture2D>("SplashScreens/Level2"));

            zTime.LoadContent(mainGame.Content.Load <Texture2D>("humanities_bar"));
            potion.LoadContent(mainGame.Content.Load <Texture2D>("StaticPic/potion"), mainGame.Content.Load <SoundEffect>("potion"));
        }