public List <GachaDetailParam> GetGachaDetailData() { List <GachaDetailParam> gachaDetailParamList = new List <GachaDetailParam>(); string empty = string.Empty; foreach (JSON_GachaDetailParam json in JSONParser.parseJSONArray <JSON_GachaDetailParam>(this.popupType != GachaTopPopup.PopupType.DETAIL ? AssetManager.LoadTextData("Gachas/gacha_description") : AssetManager.LoadTextData("Gachas/gacha_detail"))) { GachaDetailParam gachaDetailParam = new GachaDetailParam(); if (gachaDetailParam.Deserialize(GameUtility.Config_Language, json)) { gachaDetailParamList.Add(gachaDetailParam); } } return(gachaDetailParamList); }
private void CreateContents() { List <GachaDetailParam> gachaDetailData = this.GetGachaDetailData(); if (gachaDetailData == null) { return; } using (List <GachaDetailParam> .Enumerator enumerator = gachaDetailData.GetEnumerator()) { while (enumerator.MoveNext()) { GachaDetailParam current = enumerator.Current; if (this.popupType != GachaTopPopup.PopupType.DETAIL || !(this.mCurrentGachaIname != current.gname)) { if (current.type == 1) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.TextTemplate); gameObject.get_transform().SetParent(this.Contents.get_transform(), false); Text component = (Text)((Component)gameObject.get_transform().FindChild("Text")).GetComponent <Text>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.set_text(current.text); } gameObject.SetActive(true); } if (current.type == 2) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ImageTemplate); gameObject.get_transform().SetParent(this.Contents.get_transform(), false); RawImage component = (RawImage)((Component)gameObject.get_transform().FindChild("Image")).GetComponent <RawImage>(); string url = GachaTopPopup.HOST_URL + "/images/gacha/" + current.image; if (Object.op_Inequality((Object)component, (Object)null)) { this.StartCoroutine(this.GetWWWImage(((Component)component).get_gameObject(), url, current.width, current.height, 0)); } gameObject.SetActive(true); } } } } }