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