/// <summary> /// read avator' config, if local is not the newest,loaddown form service /// </summary> /// <returns></returns> static void read() { if (isRead) { return; } ICharacterSysConfig config = new CharacterSysConfig(); TextAsset txt = config.ItemList; if (txt == null) { return; } string str = txt.text; configList = str.JsonTransferObject <List <ClothModel> >(); configDic = new Dictionary <string, ClothModel>(); if (configList == null) { return; } for (int i = 0; i < configList.Count; i++) { configDic[configList[i].itemid] = configList[i]; } isRead = true; }
void LoadCallback(Object o) { if (o == null || hasload) { return; } ICharacterSysConfig config = new CharacterSysConfig(); config.Initialize(o); hasload = true; }