示例#1
0
        bool ShouldShowAd()
        {
            bool isFirstAdEver = lifetimeStatistics.AdsDisplayedCount == 0;

            switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
            {
            case GameGroups.GameGroupGameType.Cat:
                Configs.Cat.InterstitialAdsConfig config     = configService.GetConfig <Configs.Cat.InterstitialAdsConfig>();
                InterstitialShowParameters        showConfig = isFirstAdEver ? config.FirstAdShowParameters : config.NextAdsShowParameters;
                return(ShouldShowAd(showConfig));

            case GameGroups.GameGroupGameType.Gun:
                Configs.Gun.InterstitialAdsConfig config2     = configService.GetConfig <Configs.Gun.InterstitialAdsConfig>();
                InterstitialShowParameters        showConfig2 = isFirstAdEver ? config2.FirstAdShowParameters : config2.NextAdsShowParameters;
                return(ShouldShowAd(showConfig2));

            case GameGroups.GameGroupGameType.Orbit:
                Configs.Orbit.InterstitialAdsConfig config3     = configService.GetConfig <Configs.Orbit.InterstitialAdsConfig>();
                InterstitialShowParameters          showConfig3 = isFirstAdEver ? config3.FirstAdShowParameters : config3.NextAdsShowParameters;
                return(ShouldShowAd(showConfig3));

            case GameGroups.GameGroupGameType.Slame:
                Configs.Slame.InterstitialAdsConfig config4     = configService.GetConfig <Configs.Slame.InterstitialAdsConfig>();
                InterstitialShowParameters          showConfig4 = isFirstAdEver ? config4.FirstAdShowParameters : config4.NextAdsShowParameters;
                return(ShouldShowAd(showConfig4));
            }
            return(false);
        }
示例#2
0
        bool AllAdsResetCounter()
        {
            switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
            {
            case GameGroups.GameGroupGameType.Cat:
                Configs.Cat.InterstitialAdsConfig config = configService.GetConfig <Configs.Cat.InterstitialAdsConfig>();
                return(config.AllAdsResetCounter);

            case GameGroups.GameGroupGameType.Gun:
                Configs.Gun.InterstitialAdsConfig config2 = configService.GetConfig <Configs.Gun.InterstitialAdsConfig>();
                return(config2.AllAdsResetCounter);

            case GameGroups.GameGroupGameType.Orbit:
                Configs.Orbit.InterstitialAdsConfig config3 = configService.GetConfig <Configs.Orbit.InterstitialAdsConfig>();
                return(config3.AllAdsResetCounter);

            case GameGroups.GameGroupGameType.Slame:
                Configs.Slame.InterstitialAdsConfig config4 = configService.GetConfig <Configs.Slame.InterstitialAdsConfig>();
                return(config4.AllAdsResetCounter);
            }
            return(false);
        }