Exemplo n.º 1
0
        //Load all the assets for room 2
        private void LoadRoom3()
        {
            //ROOM 3
            //Load our enemy 1 - Room 3
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(0, 455, 25);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 3f;
            enemyHealth = 3000.0f;
            enemySpeed = 0f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Robot");
            enemyBoss = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);

            //This enemy is the final boss
            enemyBoss.IsBoss = true;

            //Load our enemy 2 - Room 3
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(-80, 400, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 450.0f;
            enemySpeed = 0.2f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Santa");
            enemyCharacter2 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 3 - Room 3
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(80, 400, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 300.0f;
            enemySpeed = 0.26f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Elf");
            enemyCharacter3 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);

            room3Enemies[0] = enemyBoss;
            room3Enemies[1] = enemyCharacter2;
            room3Enemies[2] = enemyCharacter3;
        }
Exemplo n.º 2
0
        //Load all the assets for room 1
        private void LoadRoom1()
        {
            //ROOM 1
            //Load our enemy 1 - Room 1
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(-50, 110, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 150.0f;
            enemySpeed = 0.1f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\UndeadYeti");
            enemyCharacter1 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 2 - Room 1
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(0, 110, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 200.0f;
            enemySpeed = 0.2f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Skeleton");
            enemyCharacter2 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 3 - Room 1
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(50, 110, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 150.0f;
            enemySpeed = 0.15f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\UndeadYeti");
            enemyCharacter3 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);

            room1Enemies[0] = enemyCharacter1;
            room1Enemies[1] = enemyCharacter2;
            room1Enemies[2] = enemyCharacter3;
        }
Exemplo n.º 3
0
        //Load all the assets for room 2
        private void LoadRoom2()
        {
            //ROOM 2
            //Load our enemy 1 - Room 2
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(-70, 300, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 150.0f;
            enemySpeed = 0.12f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Skeleton");
            enemyCharacter1 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 2 - Room 2
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(-35, 300, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 300.0f;
            enemySpeed = 0.08f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Zombie");
            enemyCharacter2 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 3 - Room 2
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(0, 300, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 250.0f;
            enemySpeed = 0.16f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\Mummy");
            enemyCharacter3 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 4 - Room 2
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(35, 300, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 240.0f;
            enemySpeed = 0.14f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\SwampMonster");
            enemyCharacter4 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);
            //Load our enemy 5 - Room 2
            enemyModel = Content.Load<Model>("Models\\EnemyModel");
            modPosition = new Vector3(70, 300, 0);
            modRotation = new Vector3(MathHelper.PiOver2, 0, 0);
            modScale = 1f;
            enemyHealth = 260.0f;
            enemySpeed = 0.18f;
            enemyTexture = Content.Load<Texture2D>("Textures\\Enemies\\PumpkinMan");
            enemyCharacter5 = new Enemy(enemyModel, modPosition, modRotation, modScale, enemyHealth, enemySpeed, enemyTexture);

            room2Enemies[0] = enemyCharacter1;
            room2Enemies[1] = enemyCharacter2;
            room2Enemies[2] = enemyCharacter3;
            room2Enemies[3] = enemyCharacter4;
            room2Enemies[4] = enemyCharacter5;
        }
Exemplo n.º 4
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);

            //
            //  LOAD CHARACTERS AND ENEMIES
            //
                //Load our main character
                heroModel = Content.Load<Model>("Models\\CharModel");
                modPosition = GameConstants.heroStartPosition;
                modRotation = GameConstants.heroStartRotation;
                modScale = GameConstants.heroStartScale;
                heroCharacter = new Character(heroModel, modPosition, modRotation, modScale);
                //Assign the attack to the model. Not actually created until HeroAttack.cs
                heroAttack = Content.Load<Model>("Models\\BulletAttack");
                GameConstants.heroAttackTexure = Content.Load<Texture2D>("Textures\\HeroAttack");

                //Declary enemies for each room
                //Define the number of enemies in each room and what enemies are contained within
                room1Enemies = new Enemy[GameConstants.numRoom1Enemies];
                numEnemyLeftRoom1 = GameConstants.numRoom1Enemies;
                room2Enemies = new Enemy[GameConstants.numRoom2Enemies];
                numEnemyLeftRoom2 = GameConstants.numRoom2Enemies;
                room3Enemies = new Enemy[GameConstants.numRoom3Enemies];
                numEnemyLeftRoom3 = GameConstants.numRoom3Enemies;
                //Assign the boss attack to the model. Not actually created until BossAttack.cs
                bossAttack = Content.Load<Model>("Models\\BossAttack");
                GameConstants.heroAttackTexure = Content.Load<Texture2D>("Textures\\HeroAttack");

            //
            //  LOAD CAMERAS
            //
                //Load our top down static camera
                mainCam = new Camera(false, heroCharacter);
                personCam = new Camera(true, heroCharacter); //Third Person Camera
                switchCam = mainCam; //Used as a holder to switch cameras

                //Load the default room (Room1)
                LoadRoom1();

            //
            //  LOAD OTHER ASSETS
            //
                //Floor and Wall Models
                floorModel = Content.Load<Model>("Models\\Cuboid");
                wallModelLeft = Content.Load<Model>("Models\\Cuboid");
                wallModelRight = Content.Load<Model>("Models\\Cuboid");
                wallModelVeryBack = Content.Load<Model>("Models\\Cuboid");
                wallModelBackLeft = Content.Load<Model>("Models\\Cuboid");
                wallModelBackRight = Content.Load<Model>("Models\\Cuboid");
                exitDoorModel = Content.Load<Model>("Models\\ExitDoor");
                //Images for these models
                floorTex = Content.Load<Texture2D>("Textures\\GroundTexture");
                wallTex = Content.Load<Texture2D>("Textures\\CaveWall");
                exitDoorTex = Content.Load<Texture2D>("Textures\\DoorTexture");

                //Load initial (closed) positions for the exit doors
                exitDoorPos = new Vector3(0, 121f, -10);
                exitDoor2Pos = new Vector3(0, 301f, -10);

                //Load the font for displaying text
                gameFont = Content.Load<SpriteFont>("Other\\GameFont");
                //Load health bar images
                healthBarOutline = Content.Load<Texture2D>("Textures\\HealthBarOutline");
                healthBar = Content.Load<Texture2D>("Textures\\HealthBar");

            //
            //  LOAD GAME MUSIC
            //
                //Background Music
                //Song taken from Game Boy game: Zelda: Link's Awakening
                //Turtle Rock Music : http://www.zeldauniverse.net/music/zelda-soundtracks/links-awakening-ost/
                bgMusic = Content.Load<Song>("Sounds\\ZLA_TurtleRock");
                MediaPlayer.Volume = 0.1f; //Lower the volume
                MediaPlayer.IsRepeating = true; //Have the song on repeat
                MediaPlayer.Play(bgMusic);

                //Load the sound effects
                //Sound Effects taken from Metroid games
                //http://metroidr.brpxqzme.net/index.php?act=resdb&param=01&c=5
                heroAttackSound = Content.Load<SoundEffect>("Sounds\\HeroAttackWav");
                bossAttackSound = Content.Load<SoundEffect>("Sounds\\BossAttackWav");
                SoundEffect.MasterVolume = 0.1f; //Lower the volume

            //
            //  GAME START FEATURES
            //
                //Start the game at the start screen
                gameState = 1;
                //Load various screens
                titleScreen = Content.Load<Texture2D>("Textures\\Screens\\Gp3_TitleScreen");
                winScreen = Content.Load<Texture2D>("Textures\\Screens\\Gp3_WinScreen");
                deathScreen = Content.Load<Texture2D>("Textures\\Screens\\Gp3_DeathScreen");

                //Default Game Score
                gameScore = 0;
        }