コード例 #1
0
ファイル: GameEndMenu.cs プロジェクト: Siran1994/HillsOfSteel
 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);
 }
コード例 #2
0
 private void OnDisable()
 {
     SDKManager.Instance.CloseBanner();//关闭Banner
     MenuController.GetMenu <MainMenu>().UpdatePlayMenu();
     TankPrefs.CheckAndCreateLongtermBackup();
 }