cocos2D ゲームエンジンを使用しています。そして、数回リプレイすると、ゲームシーンが点滅し始め、スプライトがまったく動かなくなります。しかし、プレイヤーが出てくるとスプライトの位置が移動します。すべての関数が呼び出されます。しかし、何も表示されません。インストゥルメントを介してメモリ消費を確認しました。メモリ消費は問題ありません。どんな助けでも大歓迎です。前もって感謝します。
これは、ゲームを終了するときに使用するコードです。
[[CCDirector sharedDirector].openGLView removeFromSuperview];
[[CCDirector sharedDirector] stopAnimation];
[[CCDirector sharedDirector] end];
これは、ゲーム シーンを再度読み込むときに使用するコードです。
if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] )
[CCDirector setDirectorType:kCCDirectorTypeDefault];
CCDirector *director = [CCDirector sharedDirector];
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
viewController.wantsFullScreenLayout = YES;
EAGLView *glView = [[EAGLView alloc] initWithFrame:[window bounds]];
[director setOpenGLView:glView];
if( ! [director enableRetinaDisplay:YES] )
CCLOG(@"Retina Display Not supported");
[director setDeviceOrientation:kCCDeviceOrientationLandscapeRight];
[viewController setView:glView];
[window addSubview: viewController.view];
[window makeKeyAndVisible];
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];
[[CCDirector sharedDirector] runWithScene: [HelloWorldLayer node]];