我不明白当我从Game Center应用程序中删除gkTurnBasedMatch时会发生什么。特别是我不明白我可以通过让对手获胜来“惩罚”结束比赛(从游戏中心应用程序)结束比赛?
我在iPad上的游戏中有这个匹配:
(lldb) p (void)NSLog(@"%@", gkMatch)
<GKTurnBasedMatch 0x17ec08d0 -
matchID:1c612b05-e7fd-41a2-a238-5b36e1718777
bundleID:XXXXXXXXXX
status:GKTurnBasedMatchStatusOpen
message:''
creationDate:2015-04-02 18:55:24 +0000
currentParticipant:
<GKTurnBasedParticipant 0x17eae510 -
playerID:G:2035125373 (local player)
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:55:25 +0000
timeoutDate:(null)>
participants:
<GKTurnBasedParticipant 0x17eae510 -
playerID:G:2035125373 (local player)
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:55:25 +0000
timeoutDate:(null)>,
<GKTurnBasedParticipant 0x17ebf2a0 -
playerID:G:1092983134
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:56:29 +0000
timeoutDate:(null)>
matchData.length:17373
matchDataMaximumSize:65536
exchanges:(null)>
然后我将我的游戏置于后台,打开游戏中心应用程序并从游戏中心应用程序中移除转弯。现在所有的比赛转弯数据都从游戏中心应用程序中删除,也从我在iPad上的游戏应用程序中删除。
我仍然可以从对手设备(iPhone)看我的比赛。那场比赛看起来像这样:
(lldb) p (void)NSLog(@"%@", gkMatch)
<GKTurnBasedMatch 0x17a88fc0 -
matchID:1c612b05-e7fd-41a2-a238-5b36e1718777
bundleID:XXXXXXXXXXXX
status:GKTurnBasedMatchStatusOpen
message:''
creationDate:2015-04-02 18:55:24 +0000
currentParticipant:
<GKTurnBasedParticipant 0x17a89010 -
playerID:G:2035125373
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:55:25 +0000
timeoutDate:(null)>
participants:
<GKTurnBasedParticipant 0x17a89010 -
playerID:G:2035125373
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:55:25 +0000
timeoutDate:(null)>,
<GKTurnBasedParticipant 0x17a89020 -
playerID:G:1092983134 (local player)
status:Active
matchOutcome:None
lastTurnDate:2015-04-02 18:56:29 +0000
timeoutDate:(null)>
matchData.length:17373
matchDataMaximumSize:65536
exchanges:(null)>
(lldb)
比赛仍然开放。当当前玩家从Game Center App中结束游戏时,如何让对手获胜?如果我可以在游戏中心应用程序中完全禁用我的游戏会很棒,但我想这是不可能的(?)。
在这种情况下是否应该调用playerQuitForMatch方法?不是。不知道这是不是沙箱。