add basic inventory, fading walls

This commit is contained in:
2026-02-17 15:26:34 -06:00
parent 6baa6956bf
commit 7123238daa
30 changed files with 6594 additions and 255 deletions
+12 -4
View File
@@ -3,13 +3,21 @@
// this class is specifically referring to items in the world that can be picked up
public class PickupableItem : Interactable
{
public Item item;
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(item))
if (GameManager.Instance.Inventory.AddItem(itemObj, quantity))
{
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);
}
@@ -17,7 +25,7 @@ public override void Interact()
public override void MoveInsideRange()
{
GameManager.Instance.DialogueManager.ShowItemText(item.itemName);
GameManager.Instance.DialogueManager.ShowItemText(itemObj.itemName);
}
public override void MoveOutsideRange()