替换 GKTurnBasedMatch 参与者属性中的玩家

发布于 2024-12-19 05:02:31 字数 405 浏览 5 评论 0原文

来自苹果的 类参考,我了解GKTurnBasedMatchparticipants 属性具有在比赛开始时确定的固定大小。此外,据我所知,参与者允许的最大人数为 16 名玩家。有什么办法可以让一名选手退出比赛并由另一名选手代替吗?换句话说,如果16名选手参加比赛,其中一名选手退出,他/她的位置可以重新填补吗?

预先感谢您的宝贵时间。

From Apple's Class Reference, I understand that GKTurnBasedMatch's participants property has a fixed size that is determined at the beginning of the match. Furthermore, I understand the maximum allowed size of participants is 16 players. Is there any way for a player to quit the match and be replaced by another player? In other words, if 16 players join the match, and one quits, can his/her spot be re-filled?

Thanks in advance for your time.

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

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

发布评论

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

评论(2

你的心境我的脸 2024-12-26 05:02:31

目前,无法从 GKTurnBasedMatch 中删除 GKTurnBasedParticipant。相反,“participantQuit...”和“endMatch...”函数将参与者的状态设置为完成。因此,参与者实际上并没有被从比赛中删除,并且他们的空位仍然被填满。

At this time, there is no way to remove a GKTurnBasedParticipant from a GKTurnBasedMatch. Instead, "participantQuit..." and "endMatch..." functions set the participant's status to Done. Thus, the participant is not actually removed from the match, and their slot remains filled.

相思故 2024-12-26 05:02:31

正如 @codeperson 所说,实际上没有已知的选项可以在任何比赛状态下替换参与者。 但我刚刚在旧的官方文档中找到了反驳声明。

查找在此文档部分“设置比赛结果当参与者离开比赛时”。

输入图片此处描述

As @codeperson said, actually there's no known options to replace participants in any state of match. But I've just found counter statement in the old official docs.

Find in this doc part "Setting the Match Outcome When a Participant Leaves a Match".

enter image description here

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