Flint Particle System Forum - ParticleFactory Mon, 12 Dec 2011 03:01:59 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher ParticleFactory http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=33#Comment_33 http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=33#Comment_33 Fri, 14 Mar 2008 16:38:07 +0000 tlp first of all, i really like flint, thank you for your effort.
I have a suggestion regarding the creation of particles.
Wouldn't it be nice if you could set a Custom ParticleCreator to the Emitter? Kind of Factory style.
I just tried it because i wanted to have particles with a target position.

let me know what you think about it.

Again big compliments

Timo ]]>
ParticleFactory http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=34#Comment_34 http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=34#Comment_34 Mon, 17 Mar 2008 11:49:04 +0000 Richard
I can think of more than one interpretation of what you're suggesting. Do you have some example code to clarify your idea? Thanks.

Richard ]]>
ParticleFactory http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=35#Comment_35 http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=35#Comment_35 Mon, 17 Mar 2008 18:28:10 +0000 tlp I wanted to create targeting Particles, so my particles needed a targetPosition property.
I wrote a TargetParticleCreator which extends ParticleCreator and i overwrote the createParticle method to create instances of TargetParticle.
But the emitter has no method to set the creator, so i had to modify it:

private static var _defaultCreator : ParticleCreator = new ParticleCreator();
private var _creator : ParticleCreator;

and

public function set creator(creator : ParticleCreator) : void {
_creator = creator;
}

public function get creator() : ParticleCreator {
return _creator ? _creator : _defaultCreator;
}

Hope you got the point. im kinda busy right now, maybe i can write some more later.

Thanx

Timo ]]>
ParticleFactory http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=36#Comment_36 http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=36#Comment_36 Tue, 18 Mar 2008 07:08:34 +0000 Richard
There is another option - the dictionary in the particle class is there so you can add additional properties to the particle. I'm not sure which is better in your instance - use the dictionary or extend particle and create a custom particle creator - I just wanted to point out the options so you can choose. ]]>
ParticleFactory http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=39#Comment_39 http://flintparticles.org/forum/comments.php?DiscussionID=11&Focus=39#Comment_39 Wed, 26 Mar 2008 08:29:36 +0000 tlp Thank you anyway. ]]>