Flint Particle System Forum - How could the pool be avoided Sat, 25 Dec 2010 17:39:00 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher How could the pool be avoided http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=864#Comment_864 http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=864#Comment_864 Tue, 14 Jul 2009 21:54:52 +0100 aobyrne 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 http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=870#Comment_870 Tue, 21 Jul 2009 08:14:35 +0100 Richard
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 http://flintparticles.org/forum/comments.php?DiscussionID=239&Focus=874#Comment_874 Tue, 28 Jul 2009 12:48:49 +0100 aobyrne