+物品展示
todo 玩家背包
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ namespace Items
|
||||
{
|
||||
base.ActivateItem();
|
||||
EventManager.Instance.OnDialogPop(index);
|
||||
EventManager.Instance.OnItemDialog(gameObject.name);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user