void LoadScreen() { AllRoot giantScreen = JsonConvert.DeserializeObject <AllRoot>(retString); CategorysItem gsCategorysItem = giantScreen.categorys[0]; screenDataItems = gsCategorysItem.data; LauncherUIManager.instance.SetScreenItemDate(); }
void LoadVR() { AllRoot vr = JsonConvert.DeserializeObject <AllRoot>(retString); CategorysItem vrCategorysItem = vr.categorys[0]; vrDataItems = vrCategorysItem.data; LauncherUIManager.instance.SetVRItemDate(); }
void Load4KPart() { // string _4kJson = HttpUitls.GetStr(_4kPath);//获取4K专区的内容 AllRoot _4K = JsonConvert.DeserializeObject <AllRoot>(retString); // Debug.Log("Count:" + _4K.categorys.Count ); categorysItem = _4K.categorys; _4kDataItems = categorysItem[0].data; LauncherUIManager.instance.Set_4kItemDate(); }
public static async void fetchAll(fetchAllDelegate CallBack) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(APIUrl + APIVersion + "/all.json"); request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync()) using (Stream stream = response.GetResponseStream()) using (StreamReader reader = new StreamReader(stream)) { string json = await reader.ReadToEndAsync(); AllRoot allRoot = JsonConvert.DeserializeObject <AllRoot>(json); CallBack(allRoot.parameters.services, allRoot.parameters.version); } }