【问题标题】:Rank of Local authenticated player in All Time best in game center leaderboard本地认证玩家在游戏中心排行榜中的历史最佳排名
【发布时间】:2012-04-30 15:13:46
【问题描述】:

我想在游戏中心排行榜中获得我的本地玩家得分在所有时间最好部分的排名。我只找到了检索本地玩家上传分数的代码。如何在排行榜中获得排名。

谢谢

【问题讨论】:

    标签: iphone ios ipad game-center leaderboard


    【解决方案1】:

    尝试使用

    GKScore* score = [leaderBoard localPlayerScore];
    NSInteger rank = score.rank;
    

    您应该通过以下方式获得最高分:

    [leaderBoard loadScoresWithCompletionHandler:^(NSArray* topScores, NSError* error){
         if (!error) {
            // topScores
         }
    }];
    

    【讨论】:

    • 正如你在这里写的 [leaderBoard LocalPlayerScore];让我知道这里的“排行榜”是什么???这是什么类型的物体? @龙卷风
    • GKLeaderboard* 排行榜;
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多