对精灵的CCWave动作

时间:2011-09-05 10:51:38

标签: 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]];

1 个答案:

答案 0 :(得分:2)

AppDelegate中,确保您的EAGL深度格式为0:

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