Example #1
0
    public void Show()
    {
        gameover = true;
        for (int i = 0; i < transform.childCount; i++)
        {
            transform.GetChild(i).gameObject.SetActive(true);
        }
        GameObject.FindWithTag("MainCamera").GetComponent <AudioSource>().Stop();
        GameObject.FindWithTag("MainCamera").GetComponent <Camera_scr>().Pause(int.MaxValue);

        HighScores_scr.LoadHighScores();
        if (player.GetComponent <Player_scr>().score > HighScores_scr.scores[4])
        {
            HighScores_scr.newHighScore = player.GetComponent <Player_scr>().score;
            Camera_scr.timeScale        = 1;
            Time.timeScale = 1;
            SceneManager.LoadScene("Highscores");
        }
    }
Example #2
0
 void Start()
 {
     HighScores_scr.LoadHighScores();
 }