Beispiel #1
0
    public void MakePurchase(GameObject buyButton)
    {
        BuyButton buyingFrom = buyButton.GetComponent <BuyButton>();

        if (coins >= buyingFrom.itemCost)
        {
            SpendCoins(buyingFrom.itemCost);
            PlayerPrefs.SetInt(buyingFrom.unlockThisBlock.name, 1);
            buyingFrom.Unlock();
        }
        EstablishAvailableCubes();
    }