private static void ProcessDeferredPurchase(string productId) { // Check if a consumable (coins) has been deferred purchased by this user. foreach (var coin in CoinList.List.Where(coin => string.Equals(productId, coin.ProductId, StringComparison.Ordinal))) { CoinStorePageController.SetDeferredPurchaseReminderActiveness(coin, true); return; } // Check if a non-consumable (car) has been deferred purchased by this user. foreach (var car in CarList.List.Where(car => string.Equals(productId, car.ProductId, StringComparison.Ordinal))) { CarStorePageController.SetDeferredPurchaseReminderActiveness(car, true); return; } Debug.LogError("Product ID doesn't match any of exist one-time products that can be deferred purchase."); }
// Update coins when player purchases coins. public void UpdateCoins(CoinList.Coin coinToPurchase) { IncreaseCoinsOwned(coinToPurchase.Amount); CoinStorePageController.SetDeferredPurchaseReminderActiveness(coinToPurchase, false); }