gamecenter API를 사용하여 회전 기반 게임을 만들고 있습니다. 플레이어를 재 시합하기 위해 한 번의 누르기 버튼을 만들어서 gamecenter보기 컨트롤러를 거쳐 같은 플레이어를 초대 할 필요가 없었습니다. 이 질문에서 iOS Game Kit Turn Based Match Programatic Rematch은 나중에 ios 6.0에서 asker 노트를 사용하면 rematchWithCompletionHandler를 사용하여이 작업을 매우 쉽게 수행 할 수 있습니다. 나는 이것을 내 게임에서 사용하려고 시도했으나 내가 만들려고하는 성냥이 불가능하다는 것을 알지 못하는 선택자 오류나 NSErrors 만 받았다.문제 Game Center의 새로운 rematchWithCompletionHandler 메서드 사용
[currentMatch rematchWithCompletionHandler:^(GKTurnBasedMatch *match, NSError *error)
{
if (error) {
NSLog(@"%@", error);
}
else
{
currentMatch = match;
currentMatch.message = @"Rematch";
}
}];
재 경기를 호출하기 전에 경기가 있어야 할 단계가 있습니까? 또는 내가 놓친 무엇인가?
'올바르게 종료되었습니다'라는 말은 각 피어가 GkMatch disconnect()를 호출했음을 의미합니까? – Bram
@Bram,이 질문은 GKTurnBasedMatch에 대해 이야기하고있었습니다. GKTurnBasedMatch에는 연결 해제 방법이 없습니다. participantQuitInTurnWithOutcome : nextParticipants : turnTimeout : matchData : completionHandler, participantQuitOutOfTurnWithOutcome : withCompletionHandler, endMatchInTurnWithMatchData : completionHandler –
내가 실시간 경기를 가지고 있고, 나는 재 대결을 요청할 때, 나는 콜백없이 얻을 다음 차례를 기반으로 경기를 끝낼 수있는 몇 가지 방법이 있습니다 오류는 있지만 expectedPlayers는 0이 아니라 1입니다. – Bram