public IEnumerator init()
    {
        string zoneUrl = "http://testdata.bumie.org/Bumie/0927/Zone/1c54bd6c-bdc9-4323-8ced-8a89435e17c6.json";

        BumResourceManager.loadResource(zoneUrl, (object data) =>
        {
            string json = (string)data;

            object jsonData = BumJsonTool.FromJson(json);
            if (jsonData == null)
            {
                return;
            }
            List <object> listData = jsonData as List <object>;
            for (int i = 0; i < listData.Count; i++)
            {
                BumZone zone = new BumZone();
                zone.deserializer(listData[i] as Dictionary <string, object>);
                zoneCollection.Add(zone.uuid, zone);
            }

            loadingOver = true;
        }, null, BumResourceType.eBumResourceType_json);
        yield return(null);
    }
Example #2
0
 internal void init()
 {
     FileInfo info = new FileInfo(BumDefine.bumUserConfigPath+ "UserLocalRecord.json");
     if (!info.Exists)
     {
         return;
     }
     BumResourceManager.loadResource(BumDefine.bumUserConfigPathFile+ "UserLocalRecord.json", (object data) =>
     {
         string json = data.ToString();
         if (json == null)
         {
             return;
         }
         object jsonData = BumJsonTool.FromJson(json);
         Deserializer(jsonData as Dictionary<string, object>);
     }, null, BumResourceType.eBumResourceType_userInfo);
 }
Example #3
0
    public void init()
    {
        FileInfo info = new FileInfo(BumDefine.bumUserConfigPath + BumLogic.clientUser.userLocalRecord.userPhone + ".json");

        if (!info.Exists)
        {
            return;
        }
        string url = BumDefine.bumUserConfigPathFile + BumLogic.clientUser.userLocalRecord.userPhone + ".json";

        BumResourceManager.loadResource(url, (object data) =>
        {
            string json = data.ToString();
            if (json == null)
            {
                return;
            }
            object jsonData = BumJsonTool.FromJson(json);

            Deserializer(jsonData as Dictionary <string, object>);
        }, null, BumResourceType.eBumResourceType_userInfo);
    }
    public IEnumerator init()
    {
        string modelUrl = "http://pboypz1tn.bkt.clouddn.com/was/table/projectTable.json";

        BumResourceManager.loadResource(modelUrl, (object data) =>
        {
            string json     = (string)data;
            object jsonData = BumJsonTool.FromJson(json);
            if (jsonData == null)
            {
                return;
            }
            List <object> listData = jsonData as List <object>;
            for (int i = 0; i < listData.Count; i++)
            {
                BumModel model = new BumModel();
                model.Deserializable(listData[i] as Dictionary <string, object>);
                modelCollection.Add(model.uuid, model);
            }

            loadingOver = true;
        }, null, BumResourceType.eBumResourceType_json);
        yield return(null);
    }