Esempio n. 1
0
        private bool LoadJson(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(false);
            }
            string src = AssetManager.LoadTextData(path);

            if (string.IsNullOrEmpty(src))
            {
                return(false);
            }
            try
            {
                JSON_QuestDropParam jsonObject = JSONParser.parseJSONObject <JSON_QuestDropParam>(src);
                if (jsonObject == null)
                {
                    throw new InvalidJSONException();
                }
                this.Deserialize(jsonObject);
            }
            catch (Exception ex)
            {
                DebugUtility.LogException(ex);
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
 private IEnumerator StartLoadAsync(JSON_QuestDropParam json)
 {
     // ISSUE: object of a compiler-generated type is created
     return((IEnumerator) new QuestDropParam.\u003CStartLoadAsync\u003Ec__Iterator7F()
     {
         json = json,
         \u003C\u0024\u003Ejson = json,
         \u003C\u003Ef__this = this
     });
 }
Esempio n. 3
0
 public void Deserialize(JSON_QuestDropParam json)
 {
     this.mSimpleDropTables.Clear();
     this.mSimpleLocalMaps.Clear();
     this.mSimpleQuestDrops.Clear();
     if (json.simpleDropTable != null)
     {
         for (int index = 0; index < json.simpleDropTable.Length; ++index)
         {
             SimpleDropTableParam simpleDropTableParam = new SimpleDropTableParam();
             if (simpleDropTableParam.Deserialize(json.simpleDropTable[index]))
             {
                 this.mSimpleDropTables.Add(simpleDropTableParam);
             }
         }
     }
     if (json.simpleLocalMaps != null)
     {
         for (int index = 0; index < json.simpleLocalMaps.Length; ++index)
         {
             SimpleLocalMapsParam simpleLocalMapsParam = new SimpleLocalMapsParam();
             if (simpleLocalMapsParam.Deserialize(json.simpleLocalMaps[index]))
             {
                 this.mSimpleLocalMaps.Add(simpleLocalMapsParam);
             }
         }
     }
     if (json.simpleQuestDrops != null)
     {
         for (int index = 0; index < json.simpleQuestDrops.Length; ++index)
         {
             SimpleQuestDropParam simpleQuestDropParam = new SimpleQuestDropParam();
             if (simpleQuestDropParam.Deserialize(json.simpleQuestDrops[index]))
             {
                 this.mSimpleQuestDrops.Add(simpleQuestDropParam);
             }
         }
     }
     this.mIsLoaded = true;
 }
Esempio n. 4
0
 private void DeserializeAsync(JSON_QuestDropParam json)
 {
     this.mStartLoadAsyncIEnumerator = this.StartLoadAsync(json);
     this.StartCoroutine(this.mStartLoadAsyncIEnumerator);
 }