Пример #1
0
 void Start()
 {
     LevelNumber.setSkipIntro(true);     //main menu intro should no longer be played when returning to it
     ftlJump = GameObject.FindGameObjectWithTag("StarList").GetComponent <FTLJump>();
     ftlJump.stopAllStars();
     blackPanel.gameObject.GetComponent <Image>().enabled = true;
     if (LevelNumber.getLoadedFromMenu())
     {
         blackPanel.setColors(new Color(0, 0, 0, 1), new Color(0, 0, 0, 0));
         preventPauseTimer = 2.5f;
     }
     else
     {
         blackPanel.setColors(new Color(0, 0, 0, 0), new Color(0, 0, 0, 0));
         try
         {
             chargeBar.setProgress(0);
             chargeText.setPercent(0);
         } catch
         {
         }
     }
     blackPanel.startColorChange();
     LevelNumber.setLoadedFromMenu(false);
     shipAudio.clip = shipHit;
     highScores     = getHighScores();
     bombCooldown   = setBombCooldown;
 }
Пример #2
0
 public void mainMenuButton()
 {
     Time.timeScale = 1;     //in case of returning to main menu from pause screen
     LevelNumber.setLoadedFromMenu(true);
     eventSystem.SetSelectedGameObject(null);
     StartCoroutine(transitionIntoSceneLoad(0.5f, "MainMenu"));
     if (survival)
     {
         setHighScore(points);
     }
 }