java - Android 的新 Google Play 游戏服务排行榜 API

标签 java android google-play-services leaderboard

前几天,随着 Android 的新 Google Play 游戏服务 的发布,我想实现他们的排行榜。看完here ,我是否正确地理解,不可能让用户向一个排行榜提交多个分数?从阅读来看似乎是这样,但如果这是真的,那就令人失望了。我希望我只是错误地阅读它,或者有另一个链接可以让我实现我需要的!

我的问题是,是否有一种方法可以使用 Android 的新 Game Services Leaderobard,用户可以向 1 个排行榜提交多个分数,而不仅仅是让排行榜存储用户获得的最高分数。

最佳答案

向排行榜提交多个分数是没有意义的。

这就是documentation says

The game services checks if this score is better than the player's current leaderboard entry for the daily, weekly, or all-time score. If it is, the game services updates the corresponding leaderboards with the new score.

为什么要向一个排行榜提交多个分数?

如果您有不同的级别,您可以create different leaderboards为此。

Games can have multiple leaderboards, up to a maximum of 100. For example, a multi-level game might provide a different leaderboard for each level, and a racing game might have a separate leaderboard for each track.

您的评论的解决方案

The game services sends a score report back to the game client. This report tells the client whether this is a new daily, weekly, or all-time high score. If it isn't, the game services will tell the client what the current daily, weekly, or all-time high score is for this player.

关于java - Android 的新 Google Play 游戏服务排行榜 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16613783/

相关文章:

java - 后退按钮触发意外停止

java - Google Cloud Messaging - 检查设备是否已经注册

firebase - google-services.json api_key 在 firebase 中是空的

android google play 服务过时了

java - 插入后检索时为空对象

java - 确定高尔夫球座顺序函数 Java

java - 当我将 ByteBuffer 转换为 String 时,为什么会得到很多不需要的输出?

java - 类 ClassFormatError :Absent-Code-attribute-in-method-that-is-not-native

android - 如何像下面的结果一样在 android 中编码 url?

android - 如何刷新 Android 版 Spotify SDK 上的访问 token ?