メニューのボタンを押した後に開始するマルチプレイヤー ゲームがあります。問題は、マルチプレイヤーを開始した直後にメニューからゲームに移行する方法がわからないことです。
ViewController.m 内
- (IBAction)multiplayer:(id)sender {
[Nextpeer launchDashboard];
}
AppDelegate.m 内
-(void)nextpeerDidTournamentStartWithDetails:(NPTournamentStartDataContainer *)tournamentContainer {
UIStoryboard *storyboard = self.storyboard;
ArcadeView *svc = [storyboard instantiateViewControllerWithIdentifier:@"arcade"];
[self presentViewController:svc animated:YES completion:nil];
srandom(tournamentContainer.tournamentRandomSeed);
[tournamentContainer tournamentIsGameControlled];
}
エラーが発生しています
「プロパティ「storyboard」がタイプ「AppDelegate *」のオブジェクトに見つかりません」および「「AppDelegate」の目に見える @interface がセレクター「presentViewController:animated:completion:」を宣言していません」
ストーリーボードを使用して、ある ViewController から別の ViewController に変更するにはどうすればよいですか?
通常、cocos2d では、次のようにします。
CCScene *gameplayScene = [CCBReader loadAsScene:@"GamePlay"];
[[CCDirector sharedDirector] replaceScene:gameplayScene];
同等のものは何ですか?