【发布时间】:2015-01-04 07:05:28
【问题描述】:
我的 viewController 中有一个 CCGLView,在完成动画后,我试图用一个空场景替换 CCGLView 中的场景。问题是,在替换场景时,我可以观察到闪烁。我想避免它,我提供下面的代码。为了避免闪烁,我必须进行哪些更改?
CC3Layer* layer=[[CC3Layer alloc]init];
CC3Scene* scene= (CC3Scene*)layer.scene;
scene.backdrop= [CC3Backdrop nodeWithColor:ccc4f(0.0/255.0, 0.0/255.0, 0.0/255.0, 0.0)];
[scene updateScene];
[self.director replaceScene:[layer asCCScene] withTransition:[CCTransition transitionCrossFadeWithDuration:1.0]];
[self.director stopAnimation];
【问题讨论】:
标签: ios objective-c iphone cocos2d-iphone cocos3d