using System; using System.Collections.Generic; using UnityEngine; public class GatheringSpot : MonoBehaviour { [Serializable] public class ItemAmount { public Item item; public int amount; } public List gatherableItems = new(); public bool hasGathered; public void Gather() { foreach (ItemAmount item in gatherableItems) { InventoryManager.instance.AddItem(item.item, item.amount); //needs check for if inventory cannot fit } hasGathered = true; gameObject.SetActive(false); } private void OnMouseDown() { //placeholder function to add items Gather(); } }