Flint Particle System Forum - possible to limit number of particles per emitter? 2010-12-26T17:42:49+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher possible to limit number of particles per emitter? http://flintparticles.org/forum/comments.php?DiscussionID=263&Focus=934#Comment_934 2009-10-16T10:25:33+01:00 2010-12-26T17:42:49+00:00 ericsoco http://flintparticles.org/forum/account.php?u=256 is there functionality that allows for limiting the number of particles per emitter that can be alive at a given time? so if there are N particles alive, the emitter will essentially drop to using a ...
thanks,
-e]]>
possible to limit number of particles per emitter? http://flintparticles.org/forum/comments.php?DiscussionID=263&Focus=940#Comment_940 2009-10-19T22:30:55+01:00 2010-12-26T17:42:49+00:00 Richard http://flintparticles.org/forum/account.php?u=1 No, there's no such counter. It shouldn't be hard to do - you could extend any counter like this class LimitedSteady extends Steady { private var _limit:uint; public function ...
class LimitedSteady extends Steady
{
private var _limit:uint;

public function LimitedSteady( limit:uint, rate:Number = 0 )
{
super( rate );
_limit = limit;
}

override public function updateEmitter( emitter:Emitter, time:Number ):uint
{
if( emitter.particles.length >= _limit )
{
return 0;
}
var count:uint = super.updateEmitter( emitter, time );
if( particles.length + count > _limit )
{
return _limit - particles.length;
}
return count;
}
}
]]>