예제 #1
0
    public void Lose()
    {
        Time.timeScale = 0f;
        playMenu.SetActive(false);
        // if new score its higher than highest score, save it as the highest score
        if (levelManager.Score > highScore)
        {
            highScore = levelManager.Score;
            saveLoadSystem.SavePlayerData(highScore);
        }

        loseMenu.SetActive(true);
        lastScoreLose.text = "Lastscore: " + levelManager.Score.ToString();
        highScoreLose.text = "Highscore: " + highScore.ToString();
    }