public void OnPurchaseFailed(Product product, PurchaseFailureReason failureReason) { Debug.LogError(string.Format("OnPurchaseFailed: FAIL. Product: '{0}', PurchaseFailureReason: {1}", product.definition.storeSpecificId, failureReason)); if (failureReason != PurchaseFailureReason.UserCancelled) { ToastMessage.ShowCustom(DLocalizationManager.Instance.GetLocalText("cannot_purchase")); } PurchaseInfo info = FindPurchase(product.definition.id); if (onPurchaseCompleted != null) { onPurchaseCompleted(false, info); } onPurchaseCompleted = null; }
private void BuyUnlockStory(PurchaseInfo info) { DataManager.Instance.UnlockAllStory(); }
private void BuyNoAds(PurchaseInfo info) { DataManager.Instance.DisableAds(); }