Closed cha0s closed 4 years ago
Good advice, but after I submit a new version, consider merging it
No problem, I'll be watching. :)
I need the ability to remove specific particles because in my engine it's possible to associate a particle with an entity. If that entity is destroyed (can happen out-of-band/async) then the associated particle must also be destroyed (to avoid 876128376 "does entity still exist" checks in PARTICLE_UPDATE
).
As long as whatever you propose allows me to do that, I'll use your branch. If my use case is too specific, I can simply maintain my fork for my own purposes.
This is indeed a good suggestion, I hope you can help write a proton promotion article. Haha
I need to be able to remove a specific particle from an emitter, so I created two API functions:
removeParticle
which will remove a particle from the emitter andremoveParticleAtIndex
which does the same thing but uses a numeric index (for speed to avoid indexOf calls if possible).A couple of other light changes to consume the API.