private void SetIcon(GameObject gameObj, int itemId) { Transform transform = gameObj.get_transform().FindChild("Content"); Transform transform2 = gameObj.get_transform().FindChild("ImageFrame"); transform.get_gameObject().SetActive(true); Transform child = transform.GetChild(0); child.set_name("image_" + itemId); GameDataUtils.SetItem(itemId, transform2.GetComponent <Image>(), child.GetComponent <Image>(), null, true); }
public void UpdateUI(Goods data) { if (data != null) { this.use = 0; this.dataTpl = data; this.ShowReduce(false); this.count = BackpackManager.Instance.OnGetGoodCount(this.dataTpl.GetLongId()); GameDataUtils.SetItem(this.dataTpl.LocalItem, this.frame, this.icon, null, true); this.num.set_text(this.count.ToString()); } }
public void SetItem(int itemId, int itemNum) { GameDataUtils.SetItem(itemId, this.frame, this.icon, null, true); this.num.set_text(itemNum.ToString()); }
public void SetItem(int itemId, int itemNum) { GameDataUtils.SetItem(itemId, this.m_spItemFrame, this.m_spItemIcon, this.m_lblItemName, true); this.m_lblItemNum.set_text(itemNum.ToString()); }