Example #1
0
    public void GameOvered()
    {
        PV.isPaused = true;
        gameOverWindow.SetActive(true);

        gameOverScore.GetComponent <Text> ().text = (int)(PV.score) + "m";
        if (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space))
        {
            sceneMover.GoToMainMenu();
        }
    }
Example #2
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (sceneType == SceneType.Main)
         {
             if (setting != null && setting.IsActiveInHierarchy())
             {
                 setting.DisableSetting(); return;
             }
             Application.Quit(); return;
         }
         if (sceneType == SceneType.Challenge)
         {
             sceneMover.GoToMainMenu(); return;
         }
     }
 }