替换 GKTurnBasedMatch 参与者属性中的玩家
来自苹果的 类参考,我了解GKTurnBasedMatch
的participants
属性具有在比赛开始时确定的固定大小。此外,据我所知,参与者
允许的最大人数为 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前,无法从
GKTurnBasedMatch
中删除GKTurnBasedParticipant
。相反,“participantQuit...”和“endMatch...”函数将参与者的状态
设置为完成
。因此,参与者实际上并没有被从比赛中删除,并且他们的空位仍然被填满。At this time, there is no way to remove a
GKTurnBasedParticipant
from aGKTurnBasedMatch
. Instead, "participantQuit..." and "endMatch..." functions set the participant'sstatus
toDone
. Thus, the participant is not actually removed from the match, and their slot remains filled.正如 @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".