Example #1
0
        public LevelParser2(String levelname)
        {
            XMLTree tree = new XMLTree();

            tree.GetData("levels.xml");
            this.levelData = new XMLLevel(tree);
            if (this.levelData.HasIntro(levelname))
            {
                this.levelData.SetLevel(levelname + (HUD.firstLevelEntrance[HUD.currentPlayer] ? "" : HotDAMN.TAG_SUBLEVEL + "main"));
            }
            else
            {
                this.levelData.SetLevel(levelname);
            }
            this.levelname  = levelname;
            HUD.setting     = GetSetting();
            addedMario      = false;
            addedBackground = false;
            addedTitlecard  = levelData.GetLevelProperty("start", "title") == null;
            String ceiling = levelData.GetLevelProperty("setting", "type");

            addedCeiling = ceiling == null || !ceiling.Equals("underwater");
            SetPhysics();

            this.levelMatrix = new List <List <Object> >();
            for (int i = 0; i < Size().Width; i++)
            {
                this.levelMatrix.Add(new List <Object>());
            }

            do /* party */ } {