Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 private void BuyUnlockStory(PurchaseInfo info)
 {
     DataManager.Instance.UnlockAllStory();
 }
Esempio n. 3
0
 private void BuyNoAds(PurchaseInfo info)
 {
     DataManager.Instance.DisableAds();
 }