2

我正在开发多人纸牌游戏。

使用此代码播放器正在添加新匹配:

-(void)addNewMatch {

    NSLog(@"addNewMatch");

    GKMatchRequest *request = [[GKMatchRequest alloc] init];

    request.maxPlayers = 2;
    request.minPlayers = 2;

    [GKTurnBasedMatch findMatchForRequest:request withCompletionHandler:^(GKTurnBasedMatch *match, NSError *error) {
        if (error) {
            NSLog(@"%@", error.localizedDescription );
        } else {
            NSLog(@"match found!");
            [self.vc dismissViewControllerAnimated:YES completion:nil];
            [[GCTurnBasedMatchHelper sharedInstance] turnBasedMatchmakerViewController:nil didFindMatch:match];

        }
    }];
}

如何列出其他玩家的所有活动比赛(房间)?

4

0 回答 0