Пример #1
0
 // OnSuccessfulCurrencyRequestReceived: Registered to be called upon reception of the answer for a successful delta of coins request
 public void OnSuccessfulCurrencyRequestReceived(SuccessfulCurrencyResponse response)
 {
     coinsLabel = "Delta of coins: " + response.DeltaOfCoins.ToString() +
                  ". Transaction ID: " + response.LatestTransactionId +
                  ".\nCurreny ID: " + response.CurrencyId +
                  ". Currency Name: " + response.CurrencyName;
 }
Пример #2
0
    public void OnSuccessfulCurrencyResponseReceived(SuccessfulCurrencyResponse response)
    {
        //
        //  CurrencyId: ID of the Virtual Currency defined in the Fyber Dashboard
        //  This example assumes the ID is identical to the Virtual Item ID
        //  defined in your Store Assets Implementation
        //  DeltaOfCoins: Amount of VC to be given
        //
        int amount = (int)response.DeltaOfCoins;

        if (amount > 0)
        {
            StoreInventory.GiveItem(response.CurrencyId, amount);
        }
    }