Esempio n. 1
0
    // ----------------------------------------------------------------
    //  Initialize
    // ----------------------------------------------------------------
    public PackData(LevelAddress myAddress, PackDataXML packDataXML)       //PackCollectionData myCollectionData,
//		this.myCollectionData = myCollectionData;
    {
        this.MyAddress = myAddress;
        this.PackName  = packDataXML.packName;

        LoadAllLevelDatas(packDataXML);
    }
Esempio n. 2
0
 // ----------------------------------------------------------------
 //  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();
 }