예제 #1
0
 private void TryBuyItem(ShopItem.ItemType itemType)
 {
     if (shopCustomer.TrySpendGoldAmount(ShopItem.GetCost(itemType)))
     {
         //can afforf cost
         shopCustomer.BouthItem(itemType);
     }
 }
예제 #2
0
 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) + "!");
     }
 }
예제 #3
0
    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);
        }
    }