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; } }
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(); }
void SetProgress(ContinueProgress continueProgress) { View.SetProgress(continueProgress.CountdownPercent); }