Exemple #1
0
    //pick up an item from the shop
    public void onClickShopButton(ShopItem item)
    {
        EconomyManager EM = TurnManager.instance.currentPlayer().wallet;

        if (holdingSomething())
        {
            dropHeldObject();
        }
        else
        {
            if (EM.TryPurchaseItem(item))
            {
                heldObjectPrice = item.cost;
                hold(item.prefab);
            }
            else
            {
                oopsSFX.Play();
            }
        }
    }