gpt4 book ai didi

objective-c - 明确回答 playerToInvite 的用途

转载 作者:行者123 更新时间:2023-12-01 19:29:06 26 4
gpt4 key购买 nike

Game Center 文档表明

playersToInvite parameter is non-nil when your application is launched directly from the Game Center application to host a match.



一些人问这究竟是如何工作的,即似乎没有办法从 Game Center 应用程序中选择 friend 并邀请他们从 Game Center 玩;仅当您在游戏中邀请时才有效。此文档是否已过时,或者是否有从 Game Center 开始特定游戏比赛的 secret 方法?我想测试我的 inviteHandler但我一直无法确定如何将此参数传递给应用程序。
[GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite *acceptedInvite, NSArray *playersToInvite)
{
// clean up games in progress here
if (acceptedInvite)
{
NSLog(@"acceptedInvite %@", acceptedInvite);
// The acceptedInvite parameter is non-nil when the application receives an
// invitation directly from another player.
GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithInvite:acceptedInvite] autorelease];
mmvc.matchmakerDelegate = self;
[self disableHomeUI];
[self presentModalViewController:mmvc animated:YES];
}
else if (playersToInvite)
{
NSLog(@"playersToInvite %@", playersToInvite);
// playersToInvite parameter is non-nil when your application is launched
// directly from the Game Center application to host a match
[self disableHomeUI];
[self doPresentMatchMakerUIWithPlayersToInvite:playersToInvite];
}
};

最佳答案

我认为这些文档并不能反射(reflect)当前的事态。据我所知,游戏中心应用程序目前甚至没有提供邀请 friend 玩的界面。

另外,检查开发者论坛(显然你有;))。来自库比蒂诺的人似乎认为这是不可能的。所以...

关于objective-c - 明确回答 playerToInvite 的用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3962717/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com