using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class InventoryManager : MonoBehaviour { public static int MAX_ITEMS = 5; public static InventoryManager Instance; public List items = new List(); private void Awake() { if(Instance == null) { Instance = this; }else if (Instance != this) { Destroy(gameObject); } } public void AddToInventory(EquippableItem pickable) { if(this.items.Count <= MAX_ITEMS) { this.items.Add(pickable); }else { // show popup - inventory is full } } // public void DropItem() // { // } }