예제 #1
0
    public void ClickBuyButton(int count)
    {
        wallet = Wallet.instance;
        switch (type)
        {
        case GoodsType.Gold:
            if (wallet.Gold >= Price)
            {
                wallet.Gold -= Price;
            }
            RandomDraw(gTotal, 'g', count);
            resultView.SetIcon(ref DrawList);
            break;

        case GoodsType.Jewelry:
            if (wallet.Jewelry >= Price)
            {
                wallet.Jewelry -= Price;
            }
            RandomDraw(jTotal, 'j', count);
            resultView.SetIcon(ref DrawList);
            break;
        }
        Wallet.instance.ChangeGoods();
    }