12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using GameLogic.Bag;
- using GameLogic.Equipment;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "WidgetItem" )]
- public partial class WidgetItem : UIComponent
- {
- public ItemInfo itemInfo;
-
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- }
- public void InitWidget(ItemInfo itemInfo)
- {
- this.itemInfo = itemInfo;
- numObj.SetActive(false);
- alertRed.SetActive(false);
- icon.gameObject.SetActive(true);
- if (itemInfo.eqInfo != null)
- {
- icon.icon_name = HeroUITools.GetEquipmentIconName(itemInfo);
- // bg.icon_name =
- }
- else
- {
- icon.icon_name = itemInfo.config.icon;
- }
- // if (itemInfo.config.itemTyp == 4)
- // {
- // itemInfo.eqInfo = PlayerManager.Instance.eqController
- // .BuildEquipment(itemInfo.config, 1, 1);
- // //itemInfo.eqInfo.InitEquipment(itemInfo.config,1,1);
- // }
- }
- public void SetEmpty()
- {
- numObj.SetActive(false);
- icon.gameObject.SetActive(false);
- alertRed.SetActive(false);
- }
- }
- }
|