add shovel and digging, basic item interaction

This commit is contained in:
2025-06-25 22:03:13 -05:00
parent 0eda440961
commit 16c8519111
22 changed files with 2412 additions and 38 deletions
+24
View File
@@ -0,0 +1,24 @@
using UnityEngine;
// this class is specifically referring to items in the world that can be picked up
public class PickupableItem : Interactable
{
public Item item;
public override void Interact()
{
Debug.Log("Picked up " + item.itemName + "!");
MoveOutsideRange(); // I don't love this but if we destroy the object we probably need to do this first
Destroy(gameObject);
}
public override void MoveInsideRange()
{
GameManager.Instance.DialogueManager.ShowItemText(item.itemName);
}
public override void MoveOutsideRange()
{
GameManager.Instance.DialogueManager.HideItemText();
}
}