public void Init(int equipid) { Equip_equip beanById = LocalModelManager.Instance.Equip_equip.GetBeanById(equipid); this.Image_Icon.set_sprite(SpriteManager.GetEquip(beanById.EquipIcon)); this.Text_Value.text = equipid.ToString(); }
public void Init(Drop_DropModel.DropData data) { this.mData = data; this.currencyparent.SetActive(false); this.equipparent.SetActive(false); this.Currency_Gift.SetActive(false); this.Text_Gift.text = GameLogic.Hold.Language.GetLanguageByTID("Box_Gift", Array.Empty <object>()); switch (data.type) { case PropType.eCurrency: { this.currencyparent.SetActive(true); this.Currency_ImageIcon.gameObject.SetActive(false); this.Text_Content.text = string.Empty; CurrencyType id = (CurrencyType)data.id; if (id == CurrencyType.Reborn) { this.Text_Content.text = GameLogic.Hold.Language.GetLanguageByTID("currency_reborn", Array.Empty <object>()); } else { this.Currency_ImageIcon.gameObject.SetActive(true); this.Currency_ImageIcon.set_sprite(SpriteManager.GetUICommonCurrency(id)); } object[] args = new object[] { this.mData.count }; this.Currency_TextCount.text = Utils.FormatString("x{0}", args); break; } case PropType.eEquip: { Equip_equip beanById = LocalModelManager.Instance.Equip_equip.GetBeanById(this.mData.id); this.equipparent.SetActive(true); this.Equip_ImageIcon.set_sprite(SpriteManager.GetEquip(beanById.EquipIcon)); object[] args = new object[] { beanById.Quality }; this.Equip_ImageBG.set_sprite(SpriteManager.GetCharUI(Utils.FormatString("CharUI_Quality{0}", args))); object[] objArray3 = new object[] { this.mData.count }; this.Text_Count.text = Utils.FormatString("x{0}", objArray3); break; } } }
public void Init(int index, Shop_MysticShop data) { if (this.mItem == null) { this.mItem = CInstance <UIResourceCreator> .Instance.GetPropOneEquip(this.equipparent.transform); this.mItem.SetButtonEnable(false); } Drop_DropModel.DropData data2 = new Drop_DropModel.DropData { type = PropType.eEquip, id = data.ProductId, count = data.ProductNum }; this.mEquipOne.Clear(); this.mEquipOne.EquipID = data.ProductId; this.mItem.InitProp(data2); this.mIndex = index; this.bBuy = false; this.mData = data; this.equipdata = LocalModelManager.Instance.Equip_equip.GetBeanById(this.mData.ProductId); if (this.equipdata == null) { object[] args = new object[] { data.ID }; SdkManager.Bugly_Report("BlackItemOneCtrl", Utils.FormatString("Init Equip_equip:{0} is null", args)); } else { this.SetBuy(this.bBuy); this.mGoldCtrl.UseTextRed(); this.mGoldCtrl.SetCurrencyType(data.PriceType); this.mGoldCtrl.SetValue(data.Price); this.Text_Sold.text = GameLogic.Hold.Language.GetLanguageByTID("blackshop_sold", Array.Empty <object>()); this.Image_Buy.transform.localScale = Vector3.one; this.Text_Name.text = this.mEquipOne.NameOnlyString; this.Text_Name.set_color(this.mEquipOne.qualityColor); } }
public virtual void SetEquip(Equip_equip equip) { this.m_Equip = equip; }