Example #1
0
    public void deserializer(Dictionary <string, object> dic)
    {
        foreach (string key in dic.Keys)
        {
            switch (key)
            {
            case "uuid":                    uuid = BumJsonTool.getStringValue(dic, key); break;

            case "seekid":                seekid = BumJsonTool.getStringValue(dic, key); break;

            case "productName":     productName = BumJsonTool.getStringValue(dic, key); break;

            case "isLoad":                isLoad = BumJsonTool.getBoolValue(dic, key); break;

            case "size":                    size = BumJsonTool.getStringValue(dic, key); break;

            case "thumbnailUrl":      thumbnailUrl = BumJsonTool.getStringValue(dic, key); break;

            case "avdioUrl":             avdioUrl = BumJsonTool.getStringValue(dic, key); break;

            case "options":               options = BumJsonTool.getStringListValue(dic, key); break;

            case "infosUrl":              infosUrl = BumJsonTool.getStringListValue(dic, key); break;

            case "objId":                   objId = BumJsonTool.getStringValue(dic, key); break;

            default: break;
            }
        }
    }
    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 #3
0
    public void Deserializer(Dictionary <string, object> dic)
    {
        foreach (string key in dic.Keys)
        {
            switch (key)
            {
            case "createdTime":
                createTime = BumJsonTool.getStringValue(dic, key);
                break;

            case "userId":
                userId = BumJsonTool.getStringValue(dic, key);
                break;

            case "status":
                loginStatus = BumJsonTool.getStringValue(dic, key);
                break;

            case "userPhone":
                userPhone = BumJsonTool.getStringValue(dic, key);
                BumBase.LogWarning(userPhone);
                break;

            case "uuidModel":
                uuidModel = BumJsonTool.getStringListValue(dic, key);
                break;

            default:
                break;
            }
        }
    }
Example #4
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 #5
0
 public void Deserializer(Dictionary<string,object> dic)
 {
     foreach (string  key in dic.Keys)
     {
         switch (key)
         {
             case "userid":
                 userid = BumJsonTool.getStringValue(dic,key);break;
             case "userPhone":
                 userPhone = BumJsonTool.getStringValue(dic, key); break;
             case "createTime":
                 createTime = BumJsonTool.getStringValue(dic, key); break;
             case "userList":
                 userList = BumJsonTool.getStringListValue(dic, key); break;
             default:
                 break;
         }
     }
 }
Example #6
0
    public void deserializer(Dictionary <string, object> dic)
    {
        foreach (string key in dic.Keys)
        {
            switch (key)
            {
            case "uuid": uuid = BumJsonTool.getStringValue(dic, key); break;

            case "name": name = BumJsonTool.getStringValue(dic, key); break;

            case "thumbnailUrl": thumbnailUrl = BumJsonTool.getStringValue(dic, key); break;

            case "infoUrl": infoUrl = BumJsonTool.getStringValue(dic, key); break;

            case "products": products = BumJsonTool.getStringListValue(dic, key); break;

            case "objId": objId = BumJsonTool.getStringValue(dic, key); break;

            default: break;
            }
        }
    }
Example #7
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);
    }
Example #8
0
    public void Deserializable(Dictionary <string, object> obj)
    {
        foreach (string key in obj.Keys)
        {
            switch (key)
            {
            case "uuid": uuid = BumJsonTool.getStringValue(obj, key); break;

            case "modelName": modelName = BumJsonTool.getStringValue(obj, key); break;

            case "PlacementSurfaces": PlacementSurfaces = BumJsonTool.getIntValue(obj, key); break;

            case "modelUri": modelUri = BumJsonTool.getStringValue(obj, key); break;

            case "thumbnailUri": thumbnailUri = BumJsonTool.getStringValue(obj, key); break;

            default:
                Debug.Log("no find key" + key);
                break;
            }
        }
    }
    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);
    }
Example #10
0
    public void deserializer(Dictionary <string, object> dic)
    {
        foreach (string key in dic.Keys)
        {
            switch (key)
            {
            case "uuid": uuid = BumJsonTool.getStringValue(dic, key); break;

            case "name": name = BumJsonTool.getStringValue(dic, key); break;

            case "infoUrl": infoUrl = BumJsonTool.getStringValue(dic, key); break;

            case "zones": zones = BumJsonTool.getStringListValue(dic, key); break;

            case "objId": objId = BumJsonTool.getStringValue(dic, key); break;

            case "isLoad": isLoad = BumJsonTool.getBoolValue(dic, key); break;

            case "thumbnailUrl": thumbnailUrl = BumJsonTool.getStringValue(dic, key); break;

            default: Debug.LogWarning("没有找到对应的键" + key); break;
            }
        }
    }