检索Google Play游戏服务中的排行榜位置 [英] Retrieve leaderboard position in Google play game services

查看:60
本文介绍了检索Google Play游戏服务中的排行榜位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以在排行榜中检索当前用户的位置?

Is there any way to retrieve the position of the current user in a leaderboard?

谢谢.

推荐答案

我自己还没有尝试过,但是如何呢?

I haven't tried it myself but how about this ?

https://developer.android.com/reference/com/google/android/gms/games/leaderboard/LeaderboardScore.html#getRank()

公共抽象long getRank()

public abstract long getRank ()

检索从服务器返回的该分数的排名.注意 这可能并不准确,并且多个分数可以具有相同的分数 队伍.等级越低表示得分越高,等级1越高越好 得分.

Retrieves the rank returned from the server for this score. Note that this may not be exact and that multiple scores can have identical ranks. Lower ranks indicate a better score, with rank 1 being the best score on the board.

返回得分排名.

这篇关于检索Google Play游戏服务中的排行榜位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆