void Awake() { if (instance != null) { Debug.LogWarning("More than one instance of Inventory found!"); return; } instance = this; }
void Start() { inventory = GhostInvScriptLuca.instance; inventory.OnItemChangedCallback += UpdateUI; slots = itemsParent.GetComponentsInChildren <InventorySlot>(); }