예제 #1
0
        public void setLeaderboardScoreForCurrentUser(Leaderboard leaderboard, int score)
        {
            // updates the score for the current user for this leaderboard
            leaderboard.setUserScore(score).async(delegate(ActionLeaderboardSetScore action) {

                if (action.getCode () == StatusCodes.SUCCESS) {
                    getLeaderboardMembers(leaderboard, 0, 10);
                    Kumakore.LOGD(TAG, "Leaderboard:" + leaderboard.getName() + " set to " + score + " for UserId:" + app.getUser().getId());
                    return;
                } else if (handleErrorCodes(action)) {
                    //...
                }

                Kumakore.LOGE(TAG, action.getStatusMessage());
            });
        }