Flint Particle System Forum - How could the pool be avoided 2010-12-26T19:00:17+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher How could the pool be avoided http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=864#Comment_864 2009-07-14T21:54:52+01:00 2010-12-26T19:00:17+00:00 aobyrne http://flintparticles.org/forum/account.php?u=222 My particles have a random feature/aspect/characteristic so I would like the ParticleCreator2D not to reuse them. What I did was to create a new particle factory class, namely ... What I did was to create a new particle factory class, namely ParticleWasteCreator2D, which extends from ParticleCreator2D and override the disposeParticle method as follows:

override public function disposeParticle(particle:Particle):void
{
if (particle is Particle2D)
{
particle.isDead = true;
}
}

Does someone see a better way to do this?
Am I missing something?

Thanks for your help.
And thanks for this brilliant framework.]]>
How could the pool be avoided http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=870#Comment_870 2009-07-21T08:14:35+01:00 2009-07-21T08:14:47+01:00 Richard http://flintparticles.org/forum/account.php?u=1 You're looking for something like this... package org.flintparticles.twoD.particles { import org.flintparticles.common.particles.Particle; import ...
package org.flintparticles.twoD.particles
{
import org.flintparticles.common.particles.Particle;
import org.flintparticles.common.particles.ParticleFactory;

public class SimpleParticleCreator2D implements ParticleFactory
{
public function SimpleParticleCreator2D()
{
}

public function createParticle():Particle
{
return new Particle2D();
}

public function disposeParticle( particle:Particle ):void
{
}

public function clearAllParticles():void
{
}
}
}
]]>
How could the pool be avoided http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=874#Comment_874 2009-07-28T12:48:49+01:00 2010-12-26T19:00:17+00:00 aobyrne http://flintparticles.org/forum/account.php?u=222 Thank you.