开发者

Removing MANY CCSprites

Hey guys and girls. I have a method that creates rain particles, tiny images, of CCSprite class type. Everything is working well, when the clouds rain, they rain many particles of CCSprites until they leave the vertical winsize space.. Once they do leave the vertical winsize space, the iphone simulator begins to lag as it removes each rain CCSprite.

I think the problem is that their are so many CCsprites to remove, not the actual demand of having them in the memory.

My method to remove sprites is called 60 times per second. I tried pe开发者_如何转开发rhaps changing the frequency of deletion to 1/1second, but to no avail, its made it more laggy because theres more sprites to delete at once...

How could I go about fixing this problem, or am i using CCsprite ineffectively, is there a better Class to use?


There is a particle example.. which is rain particle..

call the function 30 times per second.. i am not sure why removing would lag..


To simulate rain take a look at particle effects in cocos2d (there is a rain example). It should be more effective and much more easy to create and use.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜