Question

I'm using cocos2d-x and I can get a CCParticleExplosion firing mostly correctly, but I'm looking for a way to enable it to burst its particles just once and not repeat. I can try to hack this together with duration/life settings, but I'd rather be able to specify this explicitly.

Is there a way to do this?

Was it helpful?

Solution

There's a BOOL property autoRemoveOnFinish. Set it to YES and it will remove one-shot particle effects like explosion when all particles have "died". A one-shot particle effect is one whose time is set to a positive value (ie not -1).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top