public static void LoadFromFileAndBuildMap()
        {
            MonsterUIMetaDataReader.LoadFromFile();
            List <MonsterUIMetaData> itemList = MonsterUIMetaDataReader.GetItemList();

            _itemDict = new Dictionary <string, MonsterUIMetaData>();
            foreach (MonsterUIMetaData data in itemList)
            {
                _itemDict.Add(data.name, data);
            }
        }
Example #2
0
 private void Init()
 {
     if (this._monsterIDList.Count > 0)
     {
         this._monsterDataDict       = new Dictionary <int, MonsterUIMetaData>();
         this._monsterGameObjectDict = new Dictionary <int, GameObject>();
         foreach (int num in this._monsterIDList)
         {
             MonsterUIMetaData monsterUIMetaDataByKey = MonsterUIMetaDataReader.GetMonsterUIMetaDataByKey(num);
             GameObject        obj2 = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>(monsterUIMetaDataByKey.prefabPath, BundleType.RESOURCE_FILE));
             obj2.transform.SetParent(base.view.transform.Find("Monster3dModel"), false);
             obj2.SetActive(false);
             this._monsterDataDict.Add(num, monsterUIMetaDataByKey);
             this._monsterGameObjectDict.Add(num, obj2);
         }
         this._currentMonsterIndex = 0;
         this.ShowMonsterByIndex(this._monsterIDList[this._currentMonsterIndex]);
     }
 }