Ejemplo n.º 1
0
        void OnContinueTimerUpdate(ContinueProgress continueProgress)
        {
            if (isShown)
            {
                return;
            }


            float timeBeforeSkipButtonShow = 0;

            switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
            {
            case GameGroups.GameGroupGameType.Cat:
                var config = configService.GetConfig <Ads.API.Data.Cat.ContinueAdConfig>();
                timeBeforeSkipButtonShow = config.TimeBeforeSkipButtonShow;
                break;

            case GameGroups.GameGroupGameType.Gun:
                var config2 = configService.GetConfig <Ads.API.Data.Gun.ContinueAdConfig>();
                timeBeforeSkipButtonShow = config2.TimeBeforeSkipButtonShow;
                break;

            case GameGroups.GameGroupGameType.Orbit:
                var config3 = configService.GetConfig <Ads.API.Data.Orbit.ContinueAdConfig>();
                timeBeforeSkipButtonShow = config3.TimeBeforeSkipButtonShow;
                break;

            case GameGroups.GameGroupGameType.Slame:
                var config4 = configService.GetConfig <Ads.API.Data.Slame.ContinueAdConfig>();
                timeBeforeSkipButtonShow = config4.TimeBeforeSkipButtonShow;
                break;
            }

            if (continueProgress.TimePassed > timeBeforeSkipButtonShow)
            {
                Show();
                isShown = true;
            }
        }
Ejemplo n.º 2
0
        public void Init()
        {
            switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
            {
            case GameGroups.GameGroupGameType.Cat:
                continueProgress = new ContinueProgress(config.GetConfig <Ads.API.Data.Cat.ContinueAdConfig>().ButtonVisibleTime);
                break;

            case GameGroups.GameGroupGameType.Gun:
                continueProgress = new ContinueProgress(config.GetConfig <Ads.API.Data.Gun.ContinueAdConfig>().ButtonVisibleTime);
                break;

            case GameGroups.GameGroupGameType.Orbit:
                continueProgress = new ContinueProgress(config.GetConfig <Ads.API.Data.Orbit.ContinueAdConfig>().ButtonVisibleTime);
                break;

            case GameGroups.GameGroupGameType.Slame:
                continueProgress = new ContinueProgress(config.GetConfig <Ads.API.Data.Slame.ContinueAdConfig>().ButtonVisibleTime);
                break;
            }
            //continueProgress = new ContinueProgress(config.GetConfig<ContinueAdConfig>().ButtonVisibleTime);
            Reset();
        }
Ejemplo n.º 3
0
 void SetProgress(ContinueProgress continueProgress)
 {
     View.SetProgress(continueProgress.CountdownPercent);
 }