인벤토리 기능 추가

This commit is contained in:
2026-01-27 00:34:47 +09:00
parent 658cd58e30
commit 48466bcc0f
73 changed files with 4779 additions and 228 deletions

View File

@@ -5,9 +5,11 @@ using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class UI_Base : MonoBehaviour
public abstract class UI_Base : MonoBehaviour
{
Dictionary<Type, UnityEngine.Object[]> _objects = new Dictionary<Type, UnityEngine.Object[]>();
public abstract void Init();
// Bind<제네릭>(인자)
protected void Bind<T>(Type type) where T : UnityEngine.Object
@@ -46,6 +48,11 @@ public class UI_Base : MonoBehaviour
return objects[idx] as T;
}
protected GameObject GetObject(int idx)
{
return Get<GameObject>(idx);
}
protected TextMeshProUGUI GetText(int idx)
{
return Get<TextMeshProUGUI>(idx);
@@ -61,7 +68,7 @@ public class UI_Base : MonoBehaviour
return Get<Image>(idx);
}
public static void AddUIEvent(GameObject go, Action<PointerEventData> action, Define.UIEvent type = Define.UIEvent.Click)
public static void BindEvent(GameObject go, Action<PointerEventData> action, Define.UIEvent type = Define.UIEvent.Click)
{
UI_EventHandler evt = Util.GetOrAddComponent<UI_EventHandler>(go);