示例#1
0
    private IEnumerator UpdateLeaderboard()
    {
        while (!playGamesController.authenticated)
        {
            yield return(null);
        }

        PlayGamesController.PostToHighScoreLeaderboard(PlayerPrefManager.GetTopScore());
    }
示例#2
0
    private void ShowTopScore(int speed = 1)
    {
        if (PlayerPrefManager.GetLastScore() < PlayerPrefManager.GetTopScore())
        {
            topScoreText.GetComponent <Animator>().SetFloat("Speed", speed);
            topScoreText.GetComponent <Animator>().Play("TopScoreShow");
            return;
        }

        newBestScoreText.GetComponent <Animator>().SetFloat("Speed", speed);
        newBestScoreText.GetComponent <Animator>().Play("NewBestScoreShow");

        PlayGamesController.PostToHighScoreLeaderboard(PlayerPrefManager.GetTopScore());
    }