开发者

CCWave action on sprite

开发者 https://www.devze.com 2023-04-02 06:13 出处:网络
I\'m trying to use CCWaves action, but it turns my screen into black, any suggestions tosolve this problem?

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
                    ];
0

精彩评论

暂无评论...
验证码 换一张
取 消