Beispiel #1
0
    /* void CheckHighScore(): loads and shows banners, then checks if player has made new high score and shows related panel */
    public void CheckHighScore()
    {
        //this.GoogleAdMobBanners.LoadBanners();
        this.GoogleAdMobBanners.ShowBanners();

        if (this.CurrentScore > this.HighScore)
        {
            PlayerPrefs.SetInt("high_score", this.CurrentScore);
            this.HighScore = PlayerPrefs.GetInt("high_score");

            PlayGamesController.PostPlayerScoreToLeaderboard(this.HighScore);

            ShowNewHighScoreBox();
        }
        else
        {
            ShowLosingBox();
        }
    }