+物品展示

todo 玩家背包
This commit is contained in:
2024-09-28 18:06:49 +08:00
parent d4a9b7e0a3
commit 6d3f85829b
24 changed files with 2452 additions and 69 deletions

View File

@@ -8,11 +8,16 @@ namespace Items.Abstract
{
public int index;
private void Start()
private void OnEnable()
{
EventManager.Instance.CameraInterAct += ReceiveEvent;
}
private void OnDisable()
{
EventManager.Instance.CameraInterAct -= ReceiveEvent;
}
protected virtual void ReceiveEvent(CameraInterActArgs item)
{
if (item.Item != gameObject) return;
@@ -21,7 +26,7 @@ namespace Items.Abstract
protected virtual void ActivateItem()
{
Debug.Log("Item is activated");
//Debug.Log("Item is activated");
}
}
}

View File

@@ -10,6 +10,8 @@ namespace Items
{
base.ActivateItem();
EventManager.Instance.OnDialogPop(index);
EventManager.Instance.OnItemDialog(gameObject.name);
Destroy(gameObject);
}
}
}