// ---------------------------------------------------------------- // Initialize // ---------------------------------------------------------------- public PackData(LevelAddress myAddress, PackDataXML packDataXML) //PackCollectionData myCollectionData, // this.myCollectionData = myCollectionData; { this.MyAddress = myAddress; this.PackName = packDataXML.packName; LoadAllLevelDatas(packDataXML); }
// ---------------------------------------------------------------- // LevelDatas // ---------------------------------------------------------------- /** Makes a LevelData for every level file in our world's levels folder!! */ private void LoadAllLevelDatas(PackDataXML packDataXML) { // Convert the XML to LevelDatas! levelDatas = new List <LevelData>(); for (int i = 0; i < packDataXML.levelDataXMLs.Count; i++) { LevelAddress levelAddress = new LevelAddress(MyAddress.pack, i); LevelData newLD = new LevelData(levelAddress, packDataXML.levelDataXMLs[i]); levelDatas.Add(newLD); } // Update this value now that we've got our datas. UpdateNumLevelsCompleted(); }