- (void)turnBasedMatchmakerViewController:(GKTurnBasedMatchmakerViewController *)viewController didFindMatch:(GKTurnBasedMatch *)match {
int numberOfParticipants = [match.participants count];
// check the number of valid participant ids to find out if you need to know if this is a "new" game or not.
....
1 回答
我假设您正在使用GKTurnBasedMatchmakerViewController来查找匹配并执行类似于此的操作:
在您的委托方法中,您可以这样做以确定这是一个全新的游戏还是您加入现有游戏:
对于将用户与现有游戏配对的匹配,对手玩家必须通过在GKTurnedBasedMatch上调用此方法来“完成”他们的回合: