Created
January 18, 2012 07:39
-
-
Save timrisi/1631819 to your computer and use it in GitHub Desktop.
PlayersToInvite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)handleInviteFromGameCenter:(NSArray *)playersToInvite | |
{ | |
NSLog(@"New invite"); | |
[presentingViewController dismissModalViewControllerAnimated:YES]; | |
GKMatchRequest *request = [[GKMatchRequest alloc] init]; | |
request.playersToInvite = playersToInvite; | |
request.maxPlayers = 2; | |
request.minPlayers = 2; | |
GKTurnBasedMatchmakerViewController *viewController = [[GKTurnBasedMatchmakerViewController alloc] initWithMatchRequest:request]; | |
viewController.showExistingMatches = NO; | |
viewController.turnBasedMatchmakerDelegate = self; | |
[presentingViewController presentModalViewController:viewController animated:YES]; | |
} | |
public override void HandleInviteFromGameCenter(GKPlayer[] playersToInvite) | |
{ | |
GCHelper.presentingViewController.DismissModalViewControllerAnimated(true); | |
GKMatchRequest request = new GKMatchRequest(); | |
request.PlayersToInvite = playersToInvite; | |
request.MinPlayers = 2; | |
request.MaxPlayers = 2; | |
GKTurnBasedMatchmakerViewController viewController = new GKTurnBasedMatchmakerViewController(request); | |
viewController.ShowExistingMatches = false; | |
viewController.Delegate = new GKViewControllerDelegate(); | |
GCHelper.presentingViewController.PresentModalViewController(viewController, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment