// Use this for initialization void Start() { buttonCG = GetComponent <ButtonCG>(); menuLibrary = LibraryManager.instance.get <MenuLibrary>(); menuLibrary.onFull += () => buttonCG.setEnabled(true); menuLibrary.onNotFull += () => buttonCG.setEnabled(false); menuLibrary.checkFull(); buttonCG.clicked += startDay; }
private void updateEnableBuyButton(int money) { if (selectedItem is IngredientInventoryItemShop) { IngredientInventoryItemShop shopItem = (IngredientInventoryItemShop)selectedItem; buyButton.setEnabled(money >= shopItem.cost); } }
private void OnDestroy() { LibraryManager.instance.get <MenuLibrary>().onFull -= () => buttonCG.setEnabled(true); menuLibrary.onNotFull -= () => buttonCG.setEnabled(false); }
public void checkMoneyBalance(int money) { buyButton.setEnabled(money > cost); }