private void ToggleShop() { shopContainer = GameObject.Find("Shop"); GameObject shopPanelGO = shopContainer.transform.Find("ShopPanel").gameObject; ShopUI shopUI = shopPanelGO.GetComponent <ShopUI>(); shopUI.TogglePanel(); shopUI.UpdateUI(); }
private void Awake() { shopUI = GetComponent <ShopUI>(); inventoryManager = inventoryPanel.GetComponent <InventoryManager>(); gold = inventoryPanel.GetComponentInChildren <Gold>(); }