Exemple #1
0
        /// <summary>
        /// constructor
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;
            ScreenOrder.SaveScreen(this);

            SoundManager.PlaySong("Cave_One_Portal", true);

            dbox = new DialogueBox("Scripts/caveScript.txt");
            dbox.LoadDBox();

            level = new Level("Levels/cave.bmp");
            level.LoadLevel();
            level.CamType = "center";
            level.SetPortalState(true);

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_top_parallax"));

            friend1           = new Animation(ImageTools.LoadTexture2D("Characters/Friends/pat"), new int[] { 0, 0, 0, 0, 0, 1 }, 32, true);
            friend1.FrameTime = .75f;
            f1Pos             = new Vector2(2324, 800);

            friend2           = new Animation(ImageTools.LoadTexture2D("Characters/Friends/naomi"), new int[] { 0, 0, 1, 0, 0, 0 }, 32, true);
            friend2.FrameTime = .75f;
            f2Pos             = new Vector2(2370, 800);

            friendBoundingBox = new Rectangle((int)f1Pos.X, (int)f1Pos.Y, 110, 64);

            base.LoadContent();
        }
Exemple #2
0
        /// <summary>
        /// load all boss content
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;

            SoundManager.PlaySong("Boss_Song", true);

            levelData            = LevelData.Load();
            levelData.LastScreen = ScreenOrder.ScreenToId(this);
            levelData.GroupIndex = 1;
            levelData.LevelIndex = 0;
            levelData.Save();

            dbox = new DialogueBox("Scripts/boss1Script.txt");
            dbox.LoadDBox();
            dbox.IsActive = true;

            level = new Level("Levels/boss1.bmp");
            level.LoadLevel();
            level.CamType = "static";

            bossAnim           = new Animation(ImageTools.LoadTexture2D("Characters/Bosses/boss1"), 40, true);
            bossAnim.FrameTime = .15f;
            boss = new Boss(8);
            boss.BoundingRect = new Rectangle(17 * Tile.Size, 960 - (6 * 32), bossAnim.Width, bossAnim.Height);

            LoadProjectiles();

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_top_parallax"));

            base.LoadContent();
        }
Exemple #3
0
        /// <summary>
        /// load game assets
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;
            ScreenOrder.SaveScreen(this);

            dbox = new DialogueBox("Scripts/choiceScript.txt");
            dbox.LoadDBox();
            dbox.IsActive = true;

            level            = new Level("Levels/endBoss.bmp");
            level.TileSetRow = 2;
            level.LoadLevel();
            level.Player.MovementEnabled = false;


            bossAnim = new Animation(ImageTools.LoadTexture2D("Characters/Bosses/wraith_animation"), 6, true);
            eyeD     = ImageTools.LoadTexture2D("Characters/Bosses/eyeball_D");

            leftChoice = ImageTools.LoadTexture2D("Graphics/Misc/crystal_ball_red");
            leftBound  = new Rectangle((int)level.Player.Position.X - 64, (int)level.Player.Position.Y, 32, 64);

            rightChoice = ImageTools.LoadTexture2D("Graphics/Misc/crystal_ball_blue");
            rightBound  = new Rectangle((int)level.Player.Position.X + 64, (int)level.Player.Position.Y, 32, 64);

            //dbox = new DialogueBox("Scripts/choiceScript.txt");
            //dbox.LoadDBox();
            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_top_parallax"));

            base.LoadContent();
        }
Exemple #4
0
        /// <summary>
        ///	TODO - add music
        ///	TODO - change tilesetrow
        /// </summary>
        /// <param name="groupIndex"></param>
        private void loadGroupInfo(int groupIndex)
        {
            switch (groupIndex)
            {
            case 0:
                ScreenManager.LightingEngine.SetLightPower(3);
                shadowCam.CamSpeed = 2.5f;
                enemy      = new Enemy(Player, 0);
                background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_background"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_bottom_parallax"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_top_parallax"));
                groupBackground = ImageTools.LoadTexture2D("Graphics/Backgrounds/chapter 1");
                break;

            case 1:
                ScreenManager.LightingEngine.SetLightPower(3);
                shadowCam.CamSpeed = 2.5f;
                enemy      = new Enemy(Player, 9);
                background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_background"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_bottom_parallax"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_top_parallax"));
                groupBackground = ImageTools.LoadTexture2D("Graphics/Backgrounds/chapter 2");
                break;

            case 2:
                ScreenManager.LightingEngine.SetLightPower(3);
                shadowCam.CamSpeed = 2.5f;
                enemy      = new Enemy(Player, 9);
                background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_background"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_bottom_parallax"),
                                                    ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_top_parallax"));
                groupBackground = ImageTools.LoadTexture2D("Graphics/Backgrounds/chapter 3");
                break;
            }
        }
Exemple #5
0
        /// <summary>
        /// load game content
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;
            ScreenOrder.SaveScreen(this);

            SoundManager.PlaySong("Forest", true);
            SoundManager.AddLoopingSound("rainlong", .05f);

            level            = new Level("Levels/forest.bmp");
            level.TileSetRow = 0;
            level.LoadLevel();
            level.CamType = "center";


            cave       = ImageTools.LoadTexture2D("Graphics/Misc/cave");
            caveBounds = new Rectangle(4541, 512 - 64, 32 * 4, 64 * 2);

            storm = new ThunderStorm();

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/sun_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/mountains_parallax"), ImageTools.LoadTexture2D("Graphics/Backgrounds/clouds_parallax"));

            dbox = new DialogueBox("Scripts/forestScript.txt");
            dbox.LoadDBox();
            dbox.IsActive = true;

            dbox2 = new DialogueBox("Scripts/forestScript2.txt");
            dbox2.LoadDBox();

            controls = new List <string>();
            controls.Add("Use <A> and <D> to move left and right and <W> or <Space> to jump.");
            controls.Add("This is your canteen.\nPress <Q> to take  a drink  and heal for 1 health.");
            controls.Add("This is your current health.");
            controls.Add("You can refill your canteen by interacting, <E>, with ponds like this.");
            controls.Add("Use the mouse to move your flashlight around.");
            controls.Add("You can pause the game by pressing <Escape>");

            controlsPos = new List <Vector2>();
            controlsPos.Add(level.Player.Position - new Vector2(210, 200));
            controlsPos.Add(new Vector2(1280 - 500, 960 - 75));
            controlsPos.Add(new Vector2(1280 - 245, 115));
            controlsPos.Add(new Vector2(2688 - 200, 416 + 70));
            controlsPos.Add(level.Player.Position - new Vector2(130, 150));
            controlsPos.Add(new Vector2(TextTools.CenterText(ScreenManager.ExtraSmallFont, controls[5]).X, 50));


            friend1           = new Animation(ImageTools.LoadTexture2D("Characters/Friends/pat"), new int[] { 0, 0, 0, 0, 0, 1 }, 32, true);
            friend1.FrameTime = .75f;
            f1Pos             = level.Player.Position + new Vector2(64, 0);

            friend2           = new Animation(ImageTools.LoadTexture2D("Characters/Friends/naomi"), new int[] { 0, 0, 1, 0, 0, 0 }, 32, true);
            friend2.FrameTime = .75f;
            f2Pos             = f1Pos + new Vector2(50, 0);

            friendBoundingBox = new Rectangle((int)f1Pos.X, (int)f1Pos.Y, 64 + 18, 64);

            ScreenManager.LightingEngine.SetLightPower(3);

            base.LoadContent();
        }
Exemple #6
0
        /// <summary>
        /// load screen content
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;

            SoundManager.PlaySong("Group_2_boss", true);

            //save current screen and data for next level
            levelData            = LevelData.Load();
            levelData.LastScreen = ScreenOrder.ScreenToId(this);
            levelData.GroupIndex = 2;
            levelData.LevelIndex = 0;
            levelData.Save();



            level            = new Level("Levels/boss2.bmp");
            level.TileSetRow = 1;
            level.LoadLevel();
            level.CamType = "shadow";

            boss             = new Boss(1);
            bossCam          = new ShadowCamera(level);
            bossCam.CamSpeed = -2.5f;
            bossCam.Enabled  = true;
            wallBoss         = ImageTools.LoadTexture2D("Characters/Bosses/shadow_wall_boss");

            LoadEyes();

            //load projectiles
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(-8, 0), new Vector2(1280, 192)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(-8, 0), new Vector2(1280, 192 * 2)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(-8, 0), new Vector2(1280, 192 * 3)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(-8, 0), new Vector2(1280, 192 * 4)));

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_2_top_parallax"));

            dbox = new DialogueBox("Scripts/boss2Script.txt");
            dbox.LoadDBox();
            dbox.IsActive = true;

            base.LoadContent();
        }
Exemple #7
0
        /// <summary>
        /// load game content
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;
            ScreenOrder.SaveScreen(this);

            SoundManager.PlaySong("Boss_3", true);

            level            = new Level("Levels/endBoss.bmp");
            level.TileSetRow = 2;
            level.LoadLevel();
            level.CamType = "static";


            bossAnim           = new Animation(ImageTools.LoadTexture2D("Characters/Bosses/wraith_animation"), new int[] { 0, 1, 2, 3, 4, 5, 0 }, 384, false);
            bossAnim.FrameTime = .1f;
            boss = new Boss(10);

            eyeD          = ImageTools.LoadTexture2D("Characters/Bosses/eyeball_D");
            boss.Position = new Vector2(500, 20);
            velocity      = new Vector2(2, 0);

            leftBound  = new Rectangle(0, 0, 10, 300);
            rightBound = new Rectangle(1270, 0, 10, 300);

            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(150, 0)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(350, 0)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(550, 0)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(750, 0)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(950, 0)));
            boss.Projectiles.Add(new ShadowBall(level.Player, new Vector2(0, 5), new Vector2(1150, 0)));

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_3_top_parallax"));


            base.LoadContent();
        }
Exemple #8
0
        /// <summary>
        /// load assets
        /// </summary>
        public override void LoadContent()
        {
            Pausable = true;
            ScreenOrder.SaveScreen(this);

            SoundManager.PlaySong("Hello", true);

            level = new Level("Levels/wakeUp.bmp");
            level.LoadLevel();
            level.CamType = "center";
            level.Player.MovementEnabled = false;

            dbox = new DialogueBox("Scripts/wakeUpScript.txt");
            dbox.LoadDBox();

            overlay = ImageTools.LoadTexture2D("Graphics/Overlays/lightning");

            background = new ParallaxBackground(ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_background"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_bottom_parallax"),
                                                ImageTools.LoadTexture2D("Graphics/Backgrounds/cave_level_1_top_parallax"));

            base.LoadContent();
        }