Flint Particle System Forum - create custom particles and push to particle array?2011-12-13T14:32:06+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
create custom particles and push to particle array?http://flintparticles.org/forum/comments.php?DiscussionID=312&Focus=1081#Comment_10812010-01-29T23:09:31+00:002011-12-13T14:32:06+00:00jevinkoneshttp://flintparticles.org/forum/account.php?u=318
Hi everyone,
I've been using FLiNT for quite some time and I'm really loving it. Long live Richard Lord!!!
However, my curiosities have gotten the best of me and I've been trying for DAYS to ...
I've been using FLiNT for quite some time and I'm really loving it. Long live Richard Lord!!!
However, my curiosities have gotten the best of me and I've been trying for DAYS to figure out if it's possible to create an array of custom particles (i.e.: using a for loop) and use that for the emitter?
What would be most ideal in my situation would be to have a large array of custom particles (or objects that store information for the custom particles) that I could have use as a "pool" of particles to emit from, having only 4-5 particles in the emitter at a time. The particles would have a lifespan that once it has expired they get discarded and the next set of 5 from the array would be loaded into the emitter.
Accomplishing this without the aide of people much smarter than me is beyond my abilities. Any and all help is greatly appreciated.
Thanks in advance, Kevin]]>
create custom particles and push to particle array?http://flintparticles.org/forum/comments.php?DiscussionID=312&Focus=1082#Comment_10822010-01-29T23:13:19+00:002011-12-13T14:32:06+00:00jevinkoneshttp://flintparticles.org/forum/account.php?u=318
As for the custom particles, they would extend the Particle2D class and have added variables for text, etc.. Just thought I'd add that. :-)
create custom particles and push to particle array?http://flintparticles.org/forum/comments.php?DiscussionID=312&Focus=1099#Comment_10992010-02-09T14:05:48+00:002011-12-13T14:32:06+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
A few points to consider -
1. You can add custom properties to Flint's standard particles. The particle object contains a dictionary which can be used to store additional properties that you ...
A few points to consider -
1. You can add custom properties to Flint's standard particles. The particle object contains a dictionary which can be used to store additional properties that you want to assign to the particles.
2. The Emitter has a particleFactory property, which is a factory class that creates particles. The Emitter2D class uses a default ParticleFactory called ParticleCreator2D<\a>. You can create your own class, implementing the ParticleFactory interface, and assign it to the particleFactory property of the Emitter. Then the Emitter will use your class to get new particles, and your class can create the custom particle type that you want.
3. You may create particles and add them directly to the Emitter by using the Emitter's addExistingParticles method.