2

帮助 !全部,

当“比赛开始!预计球员人数:1”时

但不能调用“didChangeState”

我的代码是:

================================

-(IBAction)play{

    GKMatchRequest *request = [[GKMatchRequest alloc]init];
    request.minPlayers = min;
    request.maxPlayers = max;

    mmvc = [[GKMatchmakerViewController alloc]initWithMatchRequest:request];
    mmvc.matchmakerDelegate =self;
    [self presentModalViewController:mmvc animated:YES];

}

- (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match {
    [self dismissModalViewControllerAnimated:YES];
    self.myMatch = match; 
    self.myMatch.delegate = self;  

    NSLog(@"Match started! Expected Player Count:%d  %@",match.expectedPlayerCount, match.playerIDs);
}

- (void)match:(GKMatch *)match player:(NSString *)playerID didChangeState:(GKPlayerConnectionState)state
{ NSLog(@"OK!"); }

=====================

它不能给我“OK!” 但我可以看到“比赛开始!预期玩家人数:1”

你可以帮帮我吗?

4

1 回答 1

0

我有同样的问题,我认为问题出在苹果服务器上。因为我什么也没做,半小时后它又开始工作了。没有任何麻烦。

于 2014-07-08T12:28:54.677 回答