public void AddItemToShop(EquippableItem item) { if (inventory.Count < shopCapacity) { inventory.Add(item); if (shopUI) { shopUI.UpdateUI(); } } else { MessageSystem.Print("Inventory is full."); } }
private void ToggleShop() { shopContainer = GameObject.Find("Shop"); GameObject shopPanelGO = shopContainer.transform.Find("ShopPanel").gameObject; ShopUI shopUI = shopPanelGO.GetComponent <ShopUI>(); shopUI.TogglePanel(); shopUI.UpdateUI(); }