Exemplo n.º 1
0
        public void InitializePurchasing(Action completion, Action error)
        {
            //if (!IsOnline)
            //{
            //    Debug.Log("[IAP] NOT ONLINE");
            //    error?.Invoke();
            //    return;
            //}
            StoreLoadComplete = completion;
            StoreLoadError    = error;
            purchaseUtilities.CheckInternet(maxTimeOut, LoadStore, ShowConnectionFailureMessage);
            Debug.Log("[IAP] Check connection");

            //if (www.isDone && www.bytesDownloaded > 0)
            //{
            //    LoadStore();
            //}
            //else
            //{
            //    ShowConnectionFailureMessage();
            //}
            //if (www != null && (www.uploadProgress > 0 || www.progress > 0))
            //{
            //    www.Dispose();
            //}
            //if (internetCheckCoroutine != null)
            //{
            //    StopCoroutine(internetCheckCoroutine);
            //}
            //internetCheckCoroutine = StartCoroutine(CheckInternetCoroutine());
        }
Exemplo n.º 2
0
        public void Fetch(AdType adType)
        {
            switch (adType)
            {
            case AdType.Interstitial:

                if (!SceneActivationBehaviour <GameLogicActivator> .Instance.GameController.Player.HasRemovedAds)
                {
                    Debug.Log("[ADS] [ADMOB] Fetch - ad type: " + adType.ToString());
                    Crashlytics.Log($"[ADMOB] Fetch interstitial");
                    interstitialUtilities.CheckInternet(AdFailRetryTime, RequestInterstitial, RefetchInterstitial);
                }
                break;

            case AdType.RewardedVideo:

                Debug.Log("[ADS] [ADMOB] Fetch - ad type: " + adType.ToString());
                Crashlytics.Log($"[ADMOB] Fetch rewarded video");
                rewardedUtilities.CheckInternet(AdFailRetryTime, RequestRewardBasedVideo, RefetchRewardedVideo);
                break;
            }
        }