Tag: 套件

一些开始浏览对附近的玩家有可接触的问题

我试图使用[[GKMatchmaker sharedMatchmaker] startBrowsingForNearbyPlayersWithReachableHandler:]在GameKit中使用本地匹配工作。 基本上,我试图实现无界面的本地匹配:只要在我附近有一个玩家,我想连接并开始比赛。 重要的是,我只想为本地玩家这样做:我从来不想通过互联网自动匹配。 我已经在iTunes连接中为我的应用程序启用了Game Center,并在我用来testing的每台设备上注册了不同的沙盒帐户。 我已经尝试了与GKMatchmakerViewController (authentication本地播放器之后)以及与startBrowsingForNearbyPlayersWithReachableHandler:编程匹配的匹配startBrowsingForNearbyPlayersWithReachableHandler:在iPhone 4上运行相同的代码,并在桌面上彼此相邻的第4代iPod Touch上运行相同的代码。 没有find对方; 当使用GKMatchmakerViewController ,用于查找附近玩家的界面仍然在 寻找玩家… 微调,并使用startBrowsingForNearbyPlayersWithReachableHandler: ,通知块永远不会被调用。 这是我目前的testing代码块: -(void)connectLocal { if( ![GKLocalPlayer localPlayer].isAuthenticated ) { // authenticateLocalPlayer calls connectLocal again after authentication is complete [ self authenticateLocalPlayer ]; return; } [[GKMatchmaker sharedMatchmaker] startBrowsingForNearbyPlayersWithReachableHandler:^(NSString *playerID, BOOL reachable) { NSLog(@"Reachability changed for player %@", playerID ); } […]

在SceneKit中,“simd”前缀是什么意思?

有一个名为SCNNode(SIMD)的SCNNode类别,它声明了一些属性,如simdPosition , simdRotation等等。 看来这些是原来的/正常的属性position和rotation重复属性。 @property(nonatomic) simd_float3 simdPosition API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); @property(nonatomic) simd_float4 simdRotation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); position和simdPosition什么simdPosition ? 前缀“simd”是什么意思?

已弃用GKMatchMaker邀请处理程序

我有我以前用来处理邀请的以下代码: [GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite *acceptedInvite, NSArray *playersToInvite) { // Insert game-specific code here to clean up any game in progress. if (acceptedInvite) { GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithInvite:acceptedInvite]; mmvc.matchmakerDelegate = self; [self presentViewController:mmvc animated:YES completion:nil]; } }; 但是,现在已经在iOS 7被弃用了。 在哪里以及如何在我的项目中注册GameKit邀请处理程序?

如何使用研究工具包创build多选答案格式?

如何使用研究工具包创build多选答案格式。 我知道我必须使用ORKTextChoiceAnswerFormat但无法find一些代码。 任何身体可以帮助吗?