using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class UI_CheckMyselfItem : BaseItem { public ItemInfo itemInfo; public void Init(ItemInfo _itemInfo) { itemInfo = _itemInfo; } protected override void OnClick(string btnName) { base.OnClick(btnName); switch (btnName) { case "ItemCloseBtn": if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) { int count = 0; if (!GameManager.PacksackBagMgr.RemoveOneToolOrMater(itemInfo, ref count)) { itemInfo.selfObj.SetActive(true); Destroy(gameObject); } else { GetControl("CountText").text = count.ToString(); } } break; case "UI_CheckMyselfItem": Debug.Log("UI_CheckMyselfItem"); //TODO something break; } } }