从多层过渡到单层
我的代码有问题。我从单层过渡到多层,然后旋转设备。 之后,我再次将多层替换回单层。一切都按预期工作,直到我再次旋转设备,然后......
Taaraaaa .. 应用程序停止运行.. 有人可以帮助我吗? 对于代码: 单层到多层
- (void)goToGamePlayScene:(id)sender {
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"UIDeviceOrientationDidChangeNotification" object:nil];
[[CCDirector sharedDirector] replaceScene:[[[MultiLayerScene alloc] initWithGameBoardName:@"coba2"] autorelease]];
}
多层到单层 注意:以下代码是该类作为多层类的子类的代码
[[CCDirector sharedDirector] replaceScene:[HomeScene node]];
I've got problem with my code. I make a transition from a single layer to a multi layer and then rotate the device.
After that, i replace the multi layer back to a single layer, again. Everything works as expected until I rotate the device again, then...
Taaraaaa..
Application stop running..
Is there someone who can help me??
for code:
SINGLE LAYER to MLUTI LAYER
- (void)goToGamePlayScene:(id)sender {
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"UIDeviceOrientationDidChangeNotification" object:nil];
[[CCDirector sharedDirector] replaceScene:[[[MultiLayerScene alloc] initWithGameBoardName:@"coba2"] autorelease]];
}
MULTI LAYER to SINGLE LAYER
note:The following code is the code of the class being the son of a multi-layer class
[[CCDirector sharedDirector] replaceScene:[HomeScene node]];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论