CCWave action on sprite
I'm trying to use CCWaves action, but it turns my screen into black, any suggestions to solve this problem?
id myWave = [CCWaves actionWithWaves:10 amplitude:7 horizontal:YES vertical:YES gri开发者_如何学God:ccg(25,20) duration:60];
[sprite runAction: [CCRepeatForever actionWithAction: myWave]];
In your AppDelegate
, make sure your EAGL depthformat is 0:
EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGBA8 // kEAGLColorFormatRGBA8
depthFormat:0 // GL_DEPTH_COMPONENT16_OES
];
精彩评论