Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     if (PlayerPrefs.HasKey("LongestSurvivalGame"))
     {
         bestTimeTimeTrialText.setBestTimeText(PlayerPrefs.GetFloat("LongestSurvivalGame"));
     }
     if (PlayerPrefs.HasKey("HighScore"))
     {
         highScoreText.setHighScore(PlayerPrefs.GetInt("HighScore"));
     }
 }
Exemplo n.º 2
0
    public void triggerGameOverMenu(int score, int highScore)
    {
        scoreToDisplay     = score;
        highScoreToDisplay = highScore;

        scoreText = GetComponentInChildren <ScoreText>();
        scoreText.setScoreText(scoreToDisplay);

        highScoreText = GetComponentInChildren <HighScoreText>();
        highScoreText.setHighScore(highScoreToDisplay);

        animatorController = gameObject.GetComponent <Animator>();
        animatorController.SetTrigger("trigger-activation");
    }