Esempio n. 1
0
        /// <summary>
        /// load tile map data
        /// </summary>
        public override void LoadLevel()
        {
            shadowCam         = new ShadowCamera(this);
            shadowCam.Enabled = true;

            //set tile set row before the level base.loadlevel
            switch (GroupIndex)
            {
            case 0:
                TileSetRow = 0;
                break;

            case 1:
                TileSetRow = 1;
                break;

            case 2:
                TileSetRow = 2;
                break;
            }


            base.LoadLevel();

            loadGroupInfo(GroupIndex);

            SetPortalState(true);
        }
Esempio n. 2
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();
        }