Exemple #1
0
    public void StopScore()
    {
        CancelInvoke("IncrementScore"); //stop score and add to highscore
        spawner.StopSpawning();
        if (PlayerPrefs.HasKey("HighScore"))
        {
            if (PlayerPrefs.GetInt("HighScore") < score)
            {
                PlayerPrefs.SetInt("HighScore", score);
            }
        }
        else
        {
            PlayerPrefs.SetInt("HighScore", score);
        }

        highScoreNum.text = PlayerPrefs.GetInt("HighScore") + "";
        scoreNum.text     = score + "";

        gameOverPanel.SetActive(true);
    }
Exemple #2
0
 public void PlayerIsHit()
 {
     spawner.StopSpawning();
     bossScript.EndInvoke();
     gameOverCard.SetActive(true);
 }