//constructor FOR ROOM3
        public Testing_room3(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //Lists
            m_Rocks = new List <Rock>();

            //sets the spawn location
            player.position = player.GenericSPWN;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //Textures
            var texBox   = Content.Load <Texture2D>("Textures/Box");
            var texPlate = Content.Load <Texture2D>("Textures/Pressure Plate");
            var texrock  = Content.Load <Texture2D>("Textures/Rock");

            //Box
            m_Box = new Box(Content, m_windowwidth, m_windowheight);
            m_Box.LoadContent(texBox,
                              m_Box.SpawnPos);

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //pressure plate
            m_PressurePlate = new PressurePlate();
            m_PressurePlate.LoadContent(texPlate,
                                        new Vector2(m_windowwidth.Val - texPlate.Width * 3, m_windowheight - texPlate.Height * 2));

            //rock
            var rock = new Rock();

            rock.LoadContent(texrock, new Vector2(texPlate.Width, 0));
            m_Rocks.Add(rock);

            //rock
            rock = new Rock();
            rock.LoadContent(texrock, new Vector2(m_windowwidth.Val - texrock.Width * 1.9f, texrock.Height));
            m_Rocks.Add(rock);

            //rock
            rock = new Rock();
            rock.LoadContent(texrock, new Vector2(0, 400));
            m_Rocks.Add(rock);

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(2);
        }
        //constructor for the first room
        public Testing_room(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //sets the spawn location
            player.position = player.GenericSPWN;

            //allows the player to move when room loads
            player.GiveLife();

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //Textures
            var texBullet = Content.Load <Texture2D>("Bullet");

            //gun
            m_Gun = new Gun(Content, m_windowwidth, m_windowheight);
            m_Gun.LoadContent(m_Gun.texGun,
                              new Vector2(m_windowwidth.Val / 2 - m_Gun.texGun.Width / 2, m_windowheight / 2 - m_Gun.texGun.Height / 2));

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_windowwidth.Val / 2 - m_Button.texButton.Width / 2, 0));

            //bullet
            m_Bullet = new Bullet(Content, m_windowwidth, m_windowheight);
            m_Bullet.LoadContent(texBullet,
                                 new Vector2(m_windowwidth.Val - 100));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //666
            m_666 = new _666(Content, m_windowwidth, m_windowheight);
            m_666.LoadContent(m_666.Texture,
                              new Vector2(m_windowwidth.Val - m_windowwidth.Val / 4, m_windowheight / 6));

            //limb
            m_Limb = new Limb(Content, m_windowwidth, m_windowheight);
            m_Limb.LoadContent(m_Limb.Texture,
                               new Vector2(m_windowwidth.Val - m_windowwidth.Val / 5, m_windowheight / 4));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(0);
        }
        //constructor FOR ROOM2
        public Testing_room8(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //sets the players position to the rooms spawn loaction
            player.position = player.GenericSPWN;

            //Textures
            var texEnemy  = Content.Load <Texture2D>("Enemy");
            var texBullet = Content.Load <Texture2D>("Bullet");

            //enemy
            m_Enemy = new Enemy(Content, m_windowwidth, m_windowheight);
            m_Enemy.LoadContent(texEnemy,
                                new Vector2(m_windowwidth.Val - texEnemy.Width, 0));

            //gun
            m_Gun = new Gun(Content, m_windowwidth, m_windowheight);
            m_Gun.LoadContent(m_Gun.texGun, player.position);

            //bullet
            m_Bullet = new Bullet(Content, m_windowwidth, m_windowheight);
            m_Bullet.LoadContent(texBullet,
                                 new Vector2(m_windowwidth.Val - 100));

            //enemy bullet
            m_EnemyBullet = new EnemyBullet(Content, m_windowwidth, m_windowheight);
            m_EnemyBullet.LoadContent(texBullet,
                                      new Vector2(m_windowwidth.Val - 100));

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_windowwidth.Val / 2 - m_Button.texButton.Width / 2, 0));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(7);
        }
        //constructor FOR ROOM5
        public Testing_room5(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //sets the spawn location
            player.position = player.GenericSPWN;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //loads the list of arrows
            m_Arrows = new List <Arrow>();

            //Arrow1
            var arrowTex = Content.Load <Texture2D>("Textures/Arrow");

            var arrow = new Arrow(m_windowwidth);

            arrow.LoadContent(arrowTex, new Vector2(0, 0));
            m_Arrows.Add(arrow);

            arrow = new Arrow(m_windowwidth);
            arrow.LoadContent(arrowTex,
                              new Vector2(m_windowwidth.Val, m_windowheight / 2 - arrowTex.Width));
            m_Arrows.Add(arrow);

            arrow = new Arrow(m_windowwidth);
            arrow.LoadContent(arrowTex, new
                              Vector2(m_windowwidth.Val / 2 - arrowTex.Width / 2, m_windowheight / 2));
            m_Arrows.Add(arrow);

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_windowwidth.Val / 2 - m_Button.texButton.Width / 2, 0));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(4);
        }
Example #5
0
        //constructor FOR ROOM2
        public Testing_room2(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //sets the spawn location
            player.position = player.GenericSPWN;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //Textures
            var texGun    = Content.Load <Texture2D>("Gun");
            var texBullet = Content.Load <Texture2D>("Bullet");
            var texBlood  = Content.Load <Texture2D>("Textures/StaticBlood");

            //Blood
            m_Blood = new Blood();
            m_Blood.LoadContent(texBlood,
                                new Vector2(m_windowwidth.Val - texBlood.Width, m_windowheight - texBlood.Height));

            //gun
            m_Gun = new Gun(Content, m_windowwidth, m_windowheight);
            m_Gun.LoadContent(texGun,
                              new Vector2(m_windowwidth.Val * 2));

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_windowwidth.Val / 2 - m_Button.texButton.Width / 2, 0));

            //bullet
            m_Bullet = new Bullet(Content, m_windowwidth, m_windowheight);
            m_Bullet.LoadContent(texBullet, new Vector2(m_windowwidth.Val - 100));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(1);
        }
        //constructor FOR ROOM2
        public Testing_room7(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //sets the spawn location
            player.position = player.GenericSPWN;

            //load explosions sprites for efficiency
            m_sprite = Content.Load <Texture2D>("Textures/Explosion");

            //create initial game objects
            for (int i = 0; i < InitialNum; ++i)
            {
                m_Explosions.Add(GetRandomExplosion());
            }

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_windowwidth.Val / 2 - m_Button.texButton.Width / 2, 0));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(6);
        }
Example #7
0
        //constructor FOR ROOM4
        public Testing_room4(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //Where the player spawns when they die
            spawnLocation = new Vector2(m_windowwidth.Val - player.Texture.Width * 3, m_windowheight - player.Texture.Height);

            //sets the players position to the rooms spawn loaction
            player.position = spawnLocation;

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //textures
            var texSpike = Content.Load <Texture2D>("Spike");

            //button
            m_Button = new Button(Content, m_windowwidth);
            m_Button.LoadContent(m_Button.texButton,
                                 new Vector2(m_Button.texButton.Width, 0));

            //bones
            m_Bones = new Bones(Content, m_windowwidth, m_windowheight);
            m_Bones.LoadContent(m_Bones.Texture,
                                new Vector2(m_Bones.tex.Width / 2, m_windowheight - m_Bones.tex.Height));

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(m_windowwidth.Val - m_Newspaper.texNewspaper.Width, 0));

            //list of spikes
            m_Spikes = new List <Spike>();

            //every X & Y value for the spikes
            int[] positions = new int[]
            {
                1, 1, 3, 1, 1, 2, 3, 2, 1, 3,
                1, 4, 2, 4, 3, 4, 4, 4, 5, 4,
                5, 3, 5, 2, 6, 2, 7, 2, 9, 2,
                9, 1, 9, 3, 9, 4, 8, 4, 7, 4,
                7, 6, 6, 6, 5, 6, 4, 6, 3, 6,
                2, 7, 2, 6, 2, 8, 8, 6, 9, 6,
                9, 7, 10, 7, 10, 8, 10, 4, 11, 4,
                11, 5, 12, 5
            };

            //position of new spike = original spike * next number in the array
            for (int s = 0; s < positions.Count(); s += 2)
            {
                var Spikes = new Spike();
                Spikes.LoadContent(texSpike,
                                   new Vector2(m_windowwidth.Val - texSpike.Width * positions[s], m_windowheight - texSpike.Height * positions[s + 1]));
                m_Spikes.Add(Spikes);
            }

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(3);
        }
        //constructor FOR ROOM6
        public Testing_room6(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player)
        {
            //Asigns the variables
            m_content      = Content;
            m_windowwidth  = windowwidth;
            m_windowheight = windowheight;

            //sets the spawn location
            player.position = player.GenericSPWN;

            //Loads the sound file for from the content pipeline
            Wrong = Content.Load <SoundEffect>("Sound Files/Wrong");
            Right = Content.Load <SoundEffect>("Sound Files/Correct");

            //Loads the font from the font sheet
            Arial = Content.Load <SpriteFont>("Font");

            //textures
            m_textBoxes = new List <Textbox>();
            var texTextBox = Content.Load <Texture2D>("TextBox");

            //textbox left
            var textbox = new Textbox();

            textbox.OnCollision += WrongAnswerCollision;
            textbox.LoadContent(texTextBox,
                                new Vector2(0, m_windowheight / 2 - texTextBox.Height / 2));
            m_textBoxes.Add(textbox);

            //textbox middle
            textbox              = new Textbox();
            textbox.OnCollision += CorrectAnswerCollision;
            textbox.LoadContent(texTextBox,
                                new Vector2(m_windowwidth.Val / 2 - texTextBox.Width / 2, m_windowheight / 2 - texTextBox.Height / 2));
            m_textBoxes.Add(textbox);

            //textbox right
            textbox              = new Textbox();
            textbox.OnCollision += WrongAnswerCollision;
            textbox.LoadContent(texTextBox,
                                new Vector2(m_windowwidth.Val - texTextBox.Width, m_windowheight / 2 - texTextBox.Height / 2));
            m_textBoxes.Add(textbox);

            //textbox question left
            textbox = new Textbox();
            textbox.LoadContent(texTextBox,
                                new Vector2(m_windowwidth.Val / 2 - texTextBox.Width / 6, m_windowheight / 2 - texTextBox.Height * 2.5f));
            m_textBoxes.Add(textbox);

            //textbox question right
            textbox = new Textbox();
            textbox.LoadContent(texTextBox,
                                new Vector2(m_windowwidth.Val / 2 - texTextBox.Width, m_windowheight / 2 - texTextBox.Height * 2.5f));
            m_textBoxes.Add(textbox);

            //Newspaper
            m_Newspaper = new Newspaper(Content);
            m_Newspaper.LoadContent(m_Newspaper.texNewspaper,
                                    new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height));

            //Loads the speech class
            m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight);

            //Chooses which speech to start each level with
            m_Speech.StartTalking(5);
        }