123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using Core.Language;
- using Fort23.UTool;
- using GameLogic.Bag;
- using GameLogic.Equipment;
- using UnityEngine;
- using Utility;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "WidgetItem")]
- public partial class WidgetItem : ItemWidgetBasic
- {
- public ItemInfo itemInfo;
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- base.AddButtonEvent();
- }
- public void InitWidget(ItemInfo itemInfo)
- {
- this.itemInfo = itemInfo;
- icon.gameObject.SetActive(true);
- icon.icon_name = itemInfo.config.icon;
- Icon_WenHao.gameObject.SetActive(false);
- if (itemInfo.count.Value > 0)
- {
- Text_Count.gameObject.SetActive(true);
- Text_Count.text = itemInfo.count.Value.ToStringEx();
- }
- else
- {
- Text_Count.gameObject.SetActive(false);
- }
- }
- public void ShowWenhao()
- {
- Icon_WenHao.gameObject.SetActive(true);
- icon.gameObject.SetActive(false);
- Text_Count.gameObject.SetActive(false);
- }
- public override void DormancyObj()
- {
- transform.RecoverColor();
-
-
- base.DormancyObj();
- }
- }
- }
|