Exemple #1
0
 // 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;
 }
Exemple #2
0
 private void updateEnableBuyButton(int money)
 {
     if (selectedItem is IngredientInventoryItemShop)
     {
         IngredientInventoryItemShop shopItem = (IngredientInventoryItemShop)selectedItem;
         buyButton.setEnabled(money >= shopItem.cost);
     }
 }
Exemple #3
0
 private void OnDestroy()
 {
     LibraryManager.instance.get <MenuLibrary>().onFull -= () => buttonCG.setEnabled(true);
     menuLibrary.onNotFull -= () => buttonCG.setEnabled(false);
 }
Exemple #4
0
 public void checkMoneyBalance(int money)
 {
     buyButton.setEnabled(money > cost);
 }