Example #1
0
 private void BuyItem(ShopItem item)
 {
     if (InGameManager.instance.Gold >= item.cost)
     {
         item.SuccessToBuy();
         InGameManager.instance.Gold -= item.cost;
     }
     else
     {
         item.FailToBuy();
         StartCoroutine(BuyFailNotice());
     }
 }