private void ShopChanged() { currentShop = shopper.GetActiveShop(); gameObject.SetActive(currentShop != null); if (currentShop == null) { return; } shopName.text = currentShop.GetShopName(); }
private void ShopChanged() { if (currentShop != null) { currentShop.onChange -= RefreshUI; } currentShop = shopper.GetActiveShop(); gameObject.SetActive(currentShop != null); if (currentShop == null) { return; } shopName.text = currentShop.GetShopName(); currentShop.onChange += RefreshUI; RefreshUI(); }
private void ShopChanged() { if (currentShop != null) { currentShop.onChange -= RefreshUI; } currentShop = shopper.GetActiveShop(); gameObject.SetActive(currentShop != null); foreach (FilterButtonUI button in GetComponentsInChildren <FilterButtonUI>()) { button.SetShop(currentShop); } if (currentShop == null) { return; } shopName.text = currentShop.GetShopName(); currentShop.onChange += RefreshUI; RefreshUI(); }