在 GKTurnBasedMatch 中更新比赛数据而不结束回合
似乎 GameKit 只允许每次从 Game Center 服务器加载 GKTurnBasedMatch
时更新一次 GKTurnBasedMatch
。还有其他方法可以更新 matchData
属性吗?
It seems that GameKit only allows GKTurnBasedMatch
to be updated once per time that GKTurnBasedMatch
is loaded from the Game Center servers. Is there an other way to update the matchData
property?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以
根据需要多次调用 `- 来获取更新的 matchData。
如果您想做增量移动,您也可以这样做 -
将您自己的参与者作为下一个参与者。但是,您必须在提交部分移动后再次 loadMatchDataWithCompletionhandler: ,然后才能提交下一个移动部分。
You can call `-
as often as you like to get updated matchData.
If you want to do incremental moves you also can do -
with your own participant as next participant. However, you have to loadMatchDataWithCompletionhandler: once again after you submitted your partial move before you are allowed to submit the next move part.
以下方法已添加到 iOS 6.0 中的 GKTurnBasedMatch 中,并将执行您需要的操作:
“更新比赛数据,而不将游戏推进到其他玩家”
The following method was added to GKTurnBasedMatch in iOS 6.0 and will do what you need:
"Update the match data without advancing the game to another player"