private void Start() { gameOverBackToMainButton.onClick.AddListener(delegate { if (scoreRollRoutine != null) { StopCoroutine(MenuBase <GameEndMenu> .instance.scoreRollRoutine); FinishScoreRoll(); scoreRollRoutine = null; } else { if (highscoreRoutine != null) { StopCoroutine(MenuBase <GameEndMenu> .instance.highscoreRoutine); scoreRollRoutine = null; } bool num = gameOverAdventureContainer.activeInHierarchy && ranks.DidLevelUp; bool flag = (gameOverArenaContainer.activeInHierarchy || gameOverArena2v2Container.activeInHierarchy) && didArenaLevelUp; if (num | flag) { InitPromotion(); } else { PlayerDataManager.GamesThisSession++; PlayerDataManager.SelectedGameMode = GameMode.Adventure; TankPrefs.Save(); LoadingScreen.ReloadGame(delegate { TankPrefs.CheckAndCreateLongtermBackup(); MenuController.HideMenu <GameEndMenu>(); //AdsManager.ShowInterstitial(); }); } } }); //shareButton.onClick.AddListener(Share); }
private void OnDisable() { SDKManager.Instance.CloseBanner();//关闭Banner MenuController.GetMenu <MainMenu>().UpdatePlayMenu(); TankPrefs.CheckAndCreateLongtermBackup(); }