Exemple #1
0
        void RefreshView(bool isEnabled)
        {
            if (isEnabled && fullscreenAdsModel.IsAdReady(AdPlacement.Currency))
            {
                bool isDoubleModeEnabled = false;
                switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
                {
                case GameGroups.GameGroupGameType.Cat:
                    isDoubleModeEnabled = configService.GetConfig <Cat.CurrencyBonusConfig>().IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Gun:
                    isDoubleModeEnabled = configService.GetConfig <Gun.CurrencyBonusConfig>().IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Orbit:
                    isDoubleModeEnabled = configService.GetConfig <Orbit.CurrencyBonusConfig>().IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Slame:
                    isDoubleModeEnabled = configService.GetConfig <Slame.CurrencyBonusConfig>().IsDoubleModeEnabled;
                    break;
                }

                var collectedAmount = isDoubleModeEnabled
                    ? gameplayStatistics.AddedGameplayCurrency
                    : 0;
                ShowView(currencyBonus.Amount, collectedAmount);
            }
            else
            {
                View.Hide();
            }
        }
Exemple #2
0
 public bool IsAdReady(AdPlacement placement)
 {
     if (placement.IsInterstitial() && !AreAdsEnabled)
     {
         return(true);
     }
     if (placement.IsRewarded() && !AreRewardedAdsEnabled)
     {
         return(true);
     }
     return(fullscreenAdsModel.IsAdReady(placement));
 }
Exemple #3
0
        public override void Execute()
        {
            if (!continueTimer.IsOn)
            {
                return;
            }

            if (fullscreenAdsModel.IsAdReady(AdPlacement.Continue))
            {
                continueTimer.TryStartTimer();
            }
            else
            {
                gameEnd.Dispatch();
            }
        }
Exemple #4
0
 public bool IsCustomRewardAdReady()
 {
     return(fullscreenAdsModel.IsAdReady(AdPlacement.Custom));
 }
Exemple #5
0
 bool TryShowContinueButton()
 {
     return(ShouldShowContinue() &&
            fullscreenAdsModel.IsAdReady(AdPlacement.Continue) &&
            continueTimer.TryStartTimer());
 }