在哪里验证用户 - 游戏中心

发布于 2025-01-07 07:24:03 字数 356 浏览 3 评论 0原文

我正在使用 cocos2d 开发游戏。 在 Game Center 中验证用户身份的最佳位置是哪里?

我正在使用苹果提供的 GameCenterManager (GKTapper )。 在AppDelegate中的applicationDidFinishLaunching期间调用authenticateLocalUser是否可以,或者初始化过程太繁重?我知道身份验证是在后台进行的,但是它会以某种方式影响启动性能吗?

任何帮助表示赞赏。

I'm developing a game using cocos2d.
What is the best location to authenticate user in Game Center?

I'm using GameCenterManager provided by apple (GKTapper).
is it ok to call authenticateLocalUser during applicationDidFinishLaunching in AppDelegate or it is to heavy for initialization process? I know that authentication is made in background, but could it affect startup performance somehow?

Any help is appreciated.

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

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

发布评论

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

评论(1

贱贱哒 2025-01-14 07:24:03

你有点回答了你自己的问题。我认为大多数知道自己在做什么的人都会将其放在 applicationDidFinishLaunching 中,因为如果他们将其放在 init 中,则会导致加载时间稍长一些。另外,通过将其放入 init 中,您可能会发现当本地播放器已通过身份验证时,它会导致菜单屏幕中间出现您不希望出现的延迟。

You kind of answered your own question. I think that most people who know what they are doing put it in applicationDidFinishLaunching, because if they have it in the init, it will result in a slightly longer loading period. Also, by putting it in the init, you may find that when the local player has been authenticated, it shall cause lag which you do not want in the middle of the menu screen.

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