我这样结束回合,但我想给一个搜索球员的超时,问题是turnTimeout只对活跃的球员有效,而不是为状态“匹配”工作。有没有其他方法可以在一段时间后停止相亲?请帮帮我。谢谢
currentMatch.endTurn(withNextParticipants: [nextParticipant],
turnTimeout: 15.0, match: data!) { (error) in
if ((error) != nil) {
print("Error Oops, there was a problem. Try that
again.",error!)
}
}
statusLabel.text = "Game has ended"
} 发布于 2017-05-06 12:36:42
GKTurnbasedMatch没有提供任何方法来做到这一点。但是,您可以设置自己的NSTimer。如果计时器触发,而你还没有找到对手,你可以离开比赛。
https://stackoverflow.com/questions/43751374
复制相似问题