2

looking if there is a pause/resume method in this class.
something like :[CCParticleSystemQuad resume];
do I missing ? or not exists ?

Zen Of Kursat
  • 2,672
  • 1
  • 31
  • 47

2 Answers2

1

Not officially. But you could edit the source code, add a BOOL property paused and check the paused flag in the update method:

-(void) update:(ccTime)delta
{
    if (_paused == NO)
    {
        // update particles code here...
    }
}

No guarantee that it'll work but it's worth giving it a try.

It might also be possible without changing the code, but this will affect other scheduled methods and actions too:

[particleSystem pauseSchedulerAndActions];

To resume:

[particleSystem resumeSchedulerAndActions];
CodeSmile
  • 64,284
  • 20
  • 132
  • 217
0

Another trick that I used, was setEmissionRate() function. To pause particle system:

setEmissionRate(0);

To resume particle system:

setEmissionRate(latestValue);

I hope this should be good for you :)

mostafa88
  • 532
  • 1
  • 8
  • 20