Пример #1
0
        public override void Activate(bool instancePreserved)
        {
            if (!instancePreserved)
            {
                if (content == null)
                {
                    content = new ContentManager(ScreenManager.Game.Services, "Content");
                }
                bloom = new BloomComponent(ScreenManager.Game);
                ScreenManager.Game.Components.Add(bloom);
                tex = content.Load <Texture2D>("DeadScreen/redDeathScreen");


                UI        = new ChoiceDisplay(null, null, null, null, null, null, null, null, content);
                UI.setSub = "Press A to respawn.";

                ScreenManager.Game.ResetElapsedTime();
            }


            base.Activate(instancePreserved);
        }
Пример #2
0
        public override void Activate(bool instancePreserved)
        {
            if (!instancePreserved)
            {
                if (content == null)
                {
                    content = new ContentManager(ScreenManager.Game.Services, "Content");

                }
                bloom = new BloomComponent(ScreenManager.Game);
                ScreenManager.Game.Components.Add(bloom);
                tex = content.Load<Texture2D>("DeadScreen/redDeathScreen");

                UI = new ChoiceDisplay(null, null, null, null, null, null, null, null, content);
                UI.setSub = "Press A to respawn.";

                ScreenManager.Game.ResetElapsedTime();

            }

            base.Activate(instancePreserved);
        }
Пример #3
0
        /// <summary>
        /// Load graphics content for the game.
        /// </summary>
        public override void Activate(bool instancePreserved)
        {
            if (!instancePreserved)
            {
                if (content == null)
                {
                    content = new ContentManager(ScreenManager.Game.Services, "Content");
                }

                gameFont = content.Load <SpriteFont>("gamefont");

                bloom = new BloomComponent(ScreenManager.Game);
                ScreenManager.Game.Components.Add(bloom);

                /*
                 * Welcome, Blue, Pink, iniProgress, progressLoadedSFX,
                 * Questions, One, Two, Three, Opo, System, entryPoint;
                 *
                 */

                WelcomeSFX        = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Welcome_UK_WAV");
                BlueSFX           = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_BlueSquare_UK_WAV");
                PinkSFX           = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_PinkSquare_UK_WAV");
                QuestionsSFX      = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Questions_UK_WAV");
                progressLoadedSFX = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_ProgessLoaded_WAV");
                iniProgressSFX    = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Progress_Tracker_WAV");

                OneSFX        = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_One_WAV");
                TwoSFX        = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Two_WAV");
                ThreeSFX      = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Three_WAV");
                OpoSFX        = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_You_are_opo_UK_WAV");
                SystemSFX     = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_System_UK_WAV");
                EntryPointSFX = content.Load <SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_EntryPoint_WAV");



                WelcomeSFXInstance        = WelcomeSFX.CreateInstance();
                BlueSFXInstance           = BlueSFX.CreateInstance();
                PinkSFXInstance           = PinkSFX.CreateInstance();
                QuestionsSFXInstance      = QuestionsSFX.CreateInstance();
                iniProgressSFXInstance    = iniProgressSFX.CreateInstance();
                progressLoadedSFXInstance = progressLoadedSFX.CreateInstance();
                OneSFXInstance            = OneSFX.CreateInstance();
                TwoSFXInstance            = TwoSFX.CreateInstance();
                ThreeSFXInstance          = ThreeSFX.CreateInstance();
                OpoSFXInstance            = OpoSFX.CreateInstance();
                SystemSFXInstance         = SystemSFX.CreateInstance();
                EntryPointSFXInstance     = EntryPointSFX.CreateInstance();



                UI = new ChoiceDisplay(content.Load <Texture2D>("a-Button"), content.Load <Texture2D>("b-Button"),
                                       content.Load <Texture2D>("x-Button"), null, "No, Let's go!.", "Who am I?", "Where am I?!", null, content);
                UI.Acitve = false;



                cam2D   = new Cam2d(ScreenManager.GraphicsDevice);
                reticle = content.Load <Texture2D>("redReticle");
                /// player
                playerBody = new PlayerBody(content.Load <Texture2D>("redPlayer"), world, content);
                playerBody.getSetLaserStatus = false;
                playerBody.getSetDrawScore   = false;
                playerBody.getSetChoicePoint = false;

                int space = 0;

                for (int i = 0; i < 11; i++)
                {
                    Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(space - 5, 0), true, world));
                    Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(space - 5, 600), true, world));

                    if (i <= 5)
                    {
                        //vertical walls
                        Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(-50, space + 50), false, world));
                        Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(1050, space + 50), false, world));
                    }

                    space += 100;
                }

                Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(1050, 45), false, world));
                Walls.Add(new Wall(content.Load <Texture2D>("Walls/blueWallMedium"), new Vector2(1050, 555), false, world));

                // set cam track

                cam2D.TrackingBody   = playerBody.playerBody;
                cam2D.EnableTracking = true;



                // once the load has finished, we use ResetElapsedTime to tell the game's
                // timing mechanism that we have just finished a very long frame, and that
                // it should not try to catch up.
                ScreenManager.Game.ResetElapsedTime();
            }

            base.Activate(instancePreserved);
        }
Пример #4
0
        /// <summary>
        /// Load graphics content for the game.
        /// </summary>
        public override void Activate(bool instancePreserved)
        {
            if (!instancePreserved)
            {
                if (content == null)
                    content = new ContentManager(ScreenManager.Game.Services, "Content");

                gameFont = content.Load<SpriteFont>("gamefont");

                bloom = new BloomComponent(ScreenManager.Game);
                ScreenManager.Game.Components.Add(bloom);
                /*
                 * Welcome, Blue, Pink, iniProgress, progressLoadedSFX,
            Questions, One, Two, Three, Opo, System, entryPoint;
                 *
                 */

                WelcomeSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Welcome_UK_WAV");
                BlueSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_BlueSquare_UK_WAV");
                PinkSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_PinkSquare_UK_WAV");
                QuestionsSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Questions_UK_WAV");
                progressLoadedSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_ProgessLoaded_WAV");
                iniProgressSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Progress_Tracker_WAV");

                OneSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_One_WAV");
                TwoSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Two_WAV");
                ThreeSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_Three_WAV");
                OpoSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_You_are_opo_UK_WAV");
                SystemSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_System_UK_WAV");
                EntryPointSFX = content.Load<SoundEffect>("Audio/SoundFX/Vivi_Tut/Vivi_EntryPoint_WAV");

                WelcomeSFXInstance = WelcomeSFX.CreateInstance();
                BlueSFXInstance = BlueSFX.CreateInstance();
                PinkSFXInstance = PinkSFX.CreateInstance();
                QuestionsSFXInstance = QuestionsSFX.CreateInstance();
                iniProgressSFXInstance = iniProgressSFX.CreateInstance();
                progressLoadedSFXInstance = progressLoadedSFX.CreateInstance();
                OneSFXInstance = OneSFX.CreateInstance();
                TwoSFXInstance = TwoSFX.CreateInstance();
                ThreeSFXInstance = ThreeSFX.CreateInstance();
                OpoSFXInstance = OpoSFX.CreateInstance();
                SystemSFXInstance = SystemSFX.CreateInstance();
                EntryPointSFXInstance = EntryPointSFX.CreateInstance();

                UI = new ChoiceDisplay(content.Load<Texture2D>("a-Button"), content.Load<Texture2D>("b-Button"),
                    content.Load<Texture2D>("x-Button"), null, "No, Let's go!.", "Who am I?", "Where am I?!", null, content);
                UI.Acitve = false;

                cam2D = new Cam2d(ScreenManager.GraphicsDevice);
                reticle = content.Load<Texture2D>("redReticle");
                /// player
                playerBody = new PlayerBody(content.Load<Texture2D>("redPlayer"), world, content);
                playerBody.getSetLaserStatus = false;
                playerBody.getSetDrawScore = false;
                playerBody.getSetChoicePoint = false;

                int space = 0;

                for (int i = 0; i < 11; i++)
                {
                    Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(space - 5, 0), true, world));
                    Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(space - 5, 600), true, world));

                    if (i <= 5)
                    {
                        //vertical walls
                        Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(-50, space + 50), false, world));
                        Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(1050, space + 50), false, world));
                    }

                    space += 100;
                }

                Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(1050, 45), false, world));
                Walls.Add(new Wall(content.Load<Texture2D>("Walls/blueWallMedium"), new Vector2(1050, 555), false, world));

                // set cam track

                cam2D.TrackingBody = playerBody.playerBody;
                cam2D.EnableTracking = true;

                // once the load has finished, we use ResetElapsedTime to tell the game's
                // timing mechanism that we have just finished a very long frame, and that
                // it should not try to catch up.
                ScreenManager.Game.ResetElapsedTime();
            }

            base.Activate(instancePreserved);
        }