游戏中心排行榜与 cocos2d 游戏集成

发布于 2024-12-20 18:03:34 字数 796 浏览 3 评论 0 原文

我为我的 cocos2d 游戏设置了 3 个排行榜。当我单击排行榜按钮时,第一页是其中一个排行榜。我必须点击后退按钮才能查看所有排行榜并选择另一个。 这是我的代码

- (void)leaderboard {
    CCLOG(@"show leadboard");
    GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
    if (leaderboardController) {
        leaderboardController.category = [[GameCenterComponent sharedGameCenter] leaderboardCategory];

        leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime;
        leaderboardController.leaderboardDelegate = self;
        AppDelegate *delegate = [UIApplication sharedApplication].delegate;
        [delegate.viewController presentModalViewController:leaderboardController animated:YES];
    }
}

,在注释掉leaderboardController.category行之后。它仍然从排行榜之一开始。那么有没有办法从排行榜列表页面开始呢?

i set up 3 leader boards for my cocos2d game. when i click on the leader board button, the first page is one of the leader boards. and i have to tap back button to view all the leader boards and choose another.
here is my code

- (void)leaderboard {
    CCLOG(@"show leadboard");
    GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
    if (leaderboardController) {
        leaderboardController.category = [[GameCenterComponent sharedGameCenter] leaderboardCategory];

        leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime;
        leaderboardController.leaderboardDelegate = self;
        AppDelegate *delegate = [UIApplication sharedApplication].delegate;
        [delegate.viewController presentModalViewController:leaderboardController animated:YES];
    }
}

and after commenting out leaderboardController.category line. it still starts with one of the leader boards. so is there a way to start out with the leader boards list page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

执笔绘流年 2024-12-27 18:03:34

我相信这是设计

类别属性允许您配置哪个类别屏幕
排行榜打开时显示。如果不设置该属性,
排行榜将打开您在 iTunes 中配置的默认类别
连接。

您可以更改 iTunes Connect 中的默认排行榜。

回答您的其他问题:不,您不能以任何方式修改“欢迎回来”横幅。

I believe this is by design:

The category property allows you to configure which category screen is
displayed when the leaderboard opens. If you do not set this property,
the leaderboard opens to the default category you configured in iTunes
Connect.

You can change which leaderboard is the default leaderboard in iTunes Connect.

To answer your other question: no, you can't modify the "Welcome back" banner in any way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文