Hi, I am trying the new Particles object and I have some questions about it:
http://docs.giderosmobile.com/reference/gideros/Particles#ParticlesI have a Particles object placed in a actor (Sprite), I add some particles with relatively short ttl when my actor is hit.
If actor hp drop below 1 he's sent to a pool.
my issue is double:
1) usually the actor dies while he's throwing particles, thus making a bad visual effect (actor and particles disappear all together)
2) sometimes the actor is respawned "instantly", and he is still throwing particles.
The most attractive option would be to wait for the particles to reach their end, and then remove my actor. But how do I know when the right time has come? (how do I know that my set of particles is empty? I know how many particles I "launched", but then? )
The Barbaric option would be to remove the Particle object from the actor when it dies, but then I would need to add a new one in its place on respawn, weighing heavy on resources. And it would still be "rough" because this won't fix issue#1.
A method to get rid of Particles would be cool anyway
I'd like to follow the first option, if anyone can suggest me how
I am trying to avoid Timer and delayedCalls this time, and up to now it seems worth it..
thank you
Comments
see: http://docs.giderosmobile.com/reference/gideros/Particles/getParticles#Particles:getParticles
https://deluxepixel.com
I assume that the filter you're speaking of is "tag", am I right?
Another question: what's the difference between these?
Particles:setParticleTag(i, tag)
Particles:setParticlesTag()
The usage of the first one is pretty clear, what about the other? I can assume it sets a tag for the whole particles set, but which tag is it setting? Is it missing a parameter from parenthesis in docs?
Thank you
Likes: SinisterSoft, pie