Cocos2d iphone 雪碧上的CCWave作用

Cocos2d iphone 雪碧上的CCWave作用,cocos2d-iphone,sprite,Cocos2d Iphone,Sprite,我尝试使用CCWaves动作,但它会将我的屏幕变成黑色,有什么建议可以解决这个问题吗 id myWave = [CCWaves actionWithWaves:10 amplitude:7 horizontal:YES vertical:YES grid:ccg(25,20) duration:60]; [sprite runAction: [CCRepeatForever actionWithAction: myWave]]; 在您的AppDelegate中,确保您的EAGL depthf

我尝试使用CCWaves动作,但它会将我的屏幕变成黑色,有什么建议可以解决这个问题吗

id myWave = [CCWaves actionWithWaves:10 amplitude:7 horizontal:YES vertical:YES grid:ccg(25,20) duration:60];

[sprite runAction: [CCRepeatForever actionWithAction: myWave]];

在您的
AppDelegate
中,确保您的EAGL depthformat为0:

EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
                               pixelFormat:kEAGLColorFormatRGBA8    // kEAGLColorFormatRGBA8
                               depthFormat:0                        // GL_DEPTH_COMPONENT16_OES
                    ];

我很困惑我是如何否决这个问题的。上面说我一小时前做的,但我从来没有读过这个问题!无论如何,如果你编辑你的答案,它将允许我投票否决它@ChrisCooper Interbox ey的奥秘?感谢您不只是忽略它。=]