示例#1
0
 void RetreiveData()
 {
     thisCoin             = CoinObjectList.GetCoinInfo(coinID);
     thisImage.sprite     = thisCoin.coinImage;
     gemValueText.text    = thisCoin.gemValue.ToString();
     coinText.text        = thisCoin.coinValue.ToString();
     descriptionText.text = thisCoin.description;
 }
    public void OnCoinPurchase(int coinID)
    {
        CoinObject coin = CoinObjectList.GetCoinInfo(coinID);

        if (PlayerPrefs.GetInt("Gem") >= coin.gemValue)
        {
            OnShopChangedCoin(coin.coinValue);
            OnshopChangedGem(-coin.gemValue);
        }
    }