Пример #1
0
    public void GameOver()
    {
        TriangleTrigger.enabled = false;

        this.SetState(GameState.GAMEOVER);
        gads.ShowInterstitial();
        if (PlayerPrefs.GetInt("HIGHSCORE") < score)
        {
            PlayerPrefs.SetInt("HIGHSCORE", score);
            scoreTextInPopup.text = "New HighScore !\n" + score.ToString();
        }
        else
        {
            scoreTextInPopup.text = "Score : " + score.ToString() + "\nHighScore : " + PlayerPrefs.GetInt("HIGHSCORE");
        }
        GameOverPopup.SetActive(true);
    }