public void GetScoresFromLeaderboard(string leaderboardId, int timeDimension, int maxResults, bool isRealTime)
        {
            ITask <RankingScores> task =
                rankingsClient.GetRankingTopScores(leaderboardId, timeDimension, maxResults, isRealTime);

            task.AddOnSuccessListener((result) =>
            {
                Debug.Log("[HMSLeaderboardManager] GetScoresFromLeaderboard SUCCESS");
                OnGetScoresFromLeaderboardSuccess?.Invoke(result);
            }).AddOnFailureListener((exception) =>
            {
                Debug.LogError("[HMSLeaderboardManager]: GetScoresFromLeaderboard failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
                OnGetScoresFromLeaderboardFailure?.Invoke(exception);
            });
        }
Ejemplo n.º 2
0
    public void GetScoresFromLeaderboard(string leaderboardId, int timeDimension, int maxResults, int offsetPlayerRank, int pageDirection)
    {
        ITask <RankingScores> task
            = rankingsClient.GetRankingTopScores(leaderboardId, timeDimension, maxResults, offsetPlayerRank, pageDirection);

        task.AddOnSuccessListener((result) =>
        {
            Debug.Log("[HMS GAMES] GetScoresFromLeaderboard SUCCESS");
        }).AddOnFailureListener((exception) =>
        {
            Debug.Log("[HMS GAMES] GetScoresFromLeaderboard ERROR");
        });
    }