public override void Init(Artwork baseData) { Artwork = baseData; var webImage = baseData.primary_medium.type == EnumArtworkMediumType.image ? baseData.primary_medium.image.sq300 : CreateYoutubeThumbnail(baseData.primary_medium.youtube); _image.Load(webImage); }
private void UpdateData(object data) { _data = data as DataDic <DataItem.RankData>; foreach (Transform item in parentObj) { ObjectPool.GetInstance().RecycleObj(item.gameObject); } Debug.Log(_data.Data.Count); foreach (DataItem.RankData item in _data.Data) { GameObject go = ObjectPool.GetInstance().GetObj(rankItem); go.transform.SetParent(parentObj); go.transform.localScale = Vector3.one; go.SetActive(true); RankItem rItem = go.GetComponent <RankItem>(); rItem.rankNumObj.transform.GetChild(0).gameObject.SetActive(item.rank == 1); rItem.rankNumObj.transform.GetChild(1).gameObject.SetActive(item.rank == 2); rItem.rankNumObj.transform.GetChild(2).gameObject.SetActive(item.rank == 3); rItem.rankNumObj.transform.GetChild(3).gameObject.SetActive(item.rank > 3); if (item.rank > 3) { rItem.rankNumObj.transform.GetChild(3).GetComponent <Text>().text = item.rank.ToString(); } rItem.boardObj.transform.GetChild(0).gameObject.SetActive(item.rank == 1); rItem.boardObj.transform.GetChild(1).gameObject.SetActive(item.rank == 2); rItem.boardObj.transform.GetChild(2).gameObject.SetActive(item.rank == 3); rItem.boardObj.transform.GetChild(3).gameObject.SetActive(item.rank > 3); rItem.nameTxt.text = item.userinfo[GlobalData.nickname].ToString(); rItem.sanTxt.text = GlobalData.GameConstConfig.GetSan(int.Parse(item.userinfo[GlobalData.paragraph].ToString())); load_iamge.Load(item.userinfo[GlobalData.avatar].ToString(), new RawImage[] { rItem.headRawImg }); rItem.suanliTxt.text = item.score.ToString(); } }
public override void Init(ArtworkMedium artworkMedium) { var webImage = artworkMedium.type == EnumArtworkMediumType.image ? artworkMedium.image.shrinked1200x1200 : CreateYoutubeThumbnail(artworkMedium.youtube); _image.Load(webImage); }
public override void Init(CharacterModel baseData) { CharacterModel = baseData; _image.Load(baseData.portrait_image.sq150); }
public void SetUserIcon(WebImage icon) { userArtworksUserIcon.Load(icon); }
public void SetUserIcon(WebImage icon) { userCharacterModelsUserIcon.Load(icon); }