public void GetPlayerCenteredRankingScores(string leaderboardId, int timeDimension, int maxResults, bool isRealTime) { var task = rankingsClient.GetPlayerCenteredRankingScores(leaderboardId, timeDimension, maxResults, isRealTime); task.AddOnSuccessListener((result) => { Debug.Log("[HMSLeaderboardManager] GetPlayerCenteredRankingScores SUCCESS"); OnGetPlayerCenteredRankingScoresSuccess?.Invoke(result); }).AddOnFailureListener((exception) => { Debug.LogError("[HMSLeaderboardManager]: GetPlayerCenteredRankingScores failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage); OnGetPlayerCenteredRankingScoresFailure?.Invoke(exception); }); }
public void GetPlayerCenteredRankingScores(string leaderboardId, int timeDimension, int maxResults, long offsetPlayerRank, int pageDirection) { var task = rankingsClient.GetPlayerCenteredRankingScores(leaderboardId, timeDimension, maxResults, offsetPlayerRank, pageDirection); task.AddOnSuccessListener((result) => { Debug.Log("[HMSLeaderboardManager] GetPlayerCenteredRankingScores SUCCESS"); Debug.LogWarning("[HMSLeaderboardManager] " + result == null ? "null" : "not null"); Debug.LogWarning("[HMSLeaderboardManager]" + result.Ranking.RankingDisplayName + ", Count: " + result.RankingScore.Count); if (result.RankingScore.Count > 0) { Debug.LogWarning("Name: " + result.RankingScore[0].DisplayRank); Debug.LogWarning("Score: " + result.RankingScore[0].PlayerRawScore); } OnGetPlayerCenteredRankingScoresSuccess?.Invoke(result); }).AddOnFailureListener((exception) => { Debug.LogError("[HMSLeaderboardManager]: GetPlayerCenteredRankingScores failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage); OnGetPlayerCenteredRankingScoresFailure?.Invoke(exception); }); }