// 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")); } }
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"); }