private IEnumerator UpdateLeaderboard() { while (!playGamesController.authenticated) { yield return(null); } PlayGamesController.PostToHighScoreLeaderboard(PlayerPrefManager.GetTopScore()); }
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()); }