- I have problem with performance when use particles.
In my game, I have some coin, and when character “eat” coin, I want create a particle.
So I use CCParticleSystemQuad. But,when create Particles, fps is down so much.
- Each coin the character “eat”, i create one new CCParticleSystemQuad, is that right?
- I create a new project for test, and I find something.
Fps only down when you create new Particles. So it only down a short time. When created done,
fps is up like don’t have particle, does not depend how much particles run on Scene (of course,it isn’t too much).
- In my game, I need create a new Particles every time character “eat” coin, so if it have many coin “ate”
in a short time, fps is down so much although it up then.
How to fix it?
- And more question, can I create Particles before, and run it later? Now as soon as I create, particles auto run.
And can I add a callback when particles end? I don’t know how to do that.
My code to create Particles:
CCParticleSystemQuad *effect = CCParticleSystemQuad::particleWithFile("effect.plist");
I call this every time my character “eat” coin.
That effect doesn’t loop, it will auto release after done,right?
So if my character “eat” coin continuous,fps is down so much until no coin “ate”.
(if my effect loop forever, fps still up after created done)