水效果在cocos2d [英] water effect in cocos2d

查看:174
本文介绍了水效果在cocos2d的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序的背景层有一个水效果。

I'd like to have a water effect on a background layer in my app. The effect doesn't need to react to touch or anything - it just needs to wave an image a little bit.

CCWaves3D似乎确定,但离开有讨厌的黑色文物当我运行它的边缘。同样CCShaky3D。 CCLiquid使我的应用程序从20fps下降到5fps ..

CCWaves3D seem ok, but leave have nasty black artifacts around the edges when I run it. Similarly CCShaky3D. CCLiquid brings my app down from 20fps to 5fps..

我可能想尝试其他效果吗?或者,我以错误的方式使用当前效果?

Is there any other effect I might want to try out? Or perhaps I'm using the current effects in a wrong way?

id shaky = [CCShaky3D actionWithRange:4 shakeZ:NO grid:ccg(15,10) duration:4];
id liquid = [CCLiquid actionWithSize:ccg(15,10) duration:1];
id wave = [CCWaves3D actionWithWaves:18 amplitude:80 grid:ccg(15,10) duration:10];

奖金问题 - 在哪里可以找到关于cocos2d效果的好文档?我发现默认cocos2d docs完全无用&浪费了几个小时试图谷歌之前提出这个问题:/

Bonus question - where can I find any good documentation for cocos2d effects? I found default cocos2d docs utterly useless & wasted a couple of hours trying to google before asking this question :/

推荐答案

我注意到在构建/模式。你是否试图在发布模式下构建/运行?此外,您是否在设备上遇到此问题,而不仅仅是在模拟器上?

I have noticed performance issues when building/running in debug mode. Have you tried to build/run in release mode? Also, are you experiencing this on the device and not just on the simulator?

不幸的是,我没有找到针对cocos2d效果的替代文档。这里有一些链接,我收集了许多不同的资源,包括教程,制作瓷砖地图游戏的工具,使用zwoptex制作精灵表,使用顶点帮助制作一个vertices plist文件为box2d / chipmunk冲突检测而不是只是矩形,和图像&声音:

Unfortunately, I have not found alternate documentation specifically for cocos2d effects. Here are a few links to posts and sites I have gathered for many different resources including tutorials, tools for making tile map games, using zwoptex for making sprite sheets, using vertex helper for making a verticies plist file for box2d/chipmunk collision detection instead of just rectangles, and sites for images & sounds:

Cocos2d资源

需要2D iPhone图形设计

http://www.learn-cocos2d.com/knowledge-base/tutorial-professional-cocos2d-xcode-project-template/

我发现Ray的教程在查看cocos2d附带的测试应用程序时特别有用。

I have found Ray's Tutorials especially helpful along with viewing the test applications included with cocos2d.

快乐编码!

这篇关于水效果在cocos2d的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆