restructure script folder

This commit is contained in:
2026-03-07 14:42:14 -06:00
parent 94fa81168d
commit 1e08b70e2c
33 changed files with 40 additions and 17 deletions
@@ -0,0 +1,35 @@
using UnityEngine;
// this class is specifically referring to items in the world that can be picked up
public class PickupableItem : Interactable
{
public ItemIdEnum itemId;
public int quantity;
private Item itemObj;
private void Start()
{
itemObj = new Item(itemId);
Debug.Log(itemObj.itemName);
}
public override void Interact()
{
if (GameManager.Instance.Inventory.AddItem(itemObj, quantity))
{
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(itemObj.itemName);
}
public override void MoveOutsideRange()
{
GameManager.Instance.DialogueManager.HideItemText();
}
}