private void TryBuyItem(ShopItem.ItemType itemType) { if (shopCustomer.TrySpendGoldAmount(ShopItem.GetCost(itemType))) { //can afforf cost shopCustomer.BouthItem(itemType); } }
private void TryBuyItem(Item.ItemType itemType) { if (shopCustomer.TrySpendGoldAmount(Item.GetCost(itemType))) { // Can afford cost shopCustomer.BoughtItem(itemType); } else { Tooltip_Warning.ShowTooltip_Static("Cannot afford " + Item.GetCost(itemType) + "!"); } }
private void TryBuyItem(Item.ItemType itemType) { Debug.Log("Trying to buy " + itemType); //condition for shield if (itemType == Item.ItemType.Shield && shopCustomer.ShieldOn()) { return; } if (shopCustomer.TrySpendGoldAmount(Item.GetCost(itemType))) { shopCustomer.BoughtItem(itemType); } }