Пример #1
0
    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);
    }
 private void OnProductItemClickByShowCAD(BumModel bumModel)
 {
     if (this.currentLoadObject == null)
     {
         BumResourceManager.loadResource(bumModel.modelUri, null, null, BumResourceType.eBumResourceType_assetBundle, BumLoadingType.eBumLoadingType_www, BumResourcePoolType.ProductObject, bumModel.PlacementSurfaces, OnLoad);
     }
 }
Пример #3
0
 public void setTexture(GameObject go, string path, string isLocal)
 {
     BumResourceManager.loadResource(path, (object obj) => {
         Texture2D texture = (Texture2D)obj;
         RawImage image    = go.GetComponent <RawImage>();
         if (image != null)
         {
             image.texture = texture;
             return;
         }
     }, null, BumResourceType.eBumResourceType_texture2D, BumLoadingType.eBumLoadingType_auto);
 }
Пример #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);
 }
Пример #5
0
    public void setTexture(RawImage go, string path, string isLocal)
    {
        if (go == null)
        {
            Debug.LogWarning("setTexture RawImage go == null");
            return;
        }
        if (string.IsNullOrEmpty(path))
        {
            Debug.LogWarning("setTexture path == null");
            return;
        }

        BumResourceManager.loadResource(path, (object obj) =>
        {
            Texture2D texture = (Texture2D)obj;
            go.texture        = texture;
        }, null, BumResourceType.eBumResourceType_texture2D, BumLoadingType.eBumLoadingType_auto, BumResourcePoolType.None, go);
    }
Пример #6
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);
    }
Пример #7
0
    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);
    }
Пример #8
0
 public override void Render()
 {
     base.Render();
     Debug.Log(productData.thumbnailUri);
     BumResourceManager.loadResource(productData.thumbnailUri, onLoadSetTextrue, null, BumResourceType.eBumResourceType_texture2D);
 }