I'm working with Flixel and attempting to emit "custom" FlxParticles from a FlxEmitter. However, my main issue is that I typically get the default Flixel image emitted instead of my custom graphic.
If I modify the FlxParticle constructor in the Flixel source code like so:
public function FlxParticle()
{
super();
lifespan = 0;
friction = 500;
makeGraphic(4, 4, 0xFFFFFFFF);
}
I can get a custom particle (a 4 x 4 white square) to emit from my FlxEmitter.
However, if I write my own class that extends FlxParticle like so:
public class EffectParticle extends FlxParticle
{
public function EffectParticle()
{
super();
makeGraphic(4, 4, 0xFFFFFFFF);
}
}
That class won't work - I will get the default Flixel image instead of my tiny white square. I similar thing happens if I just call "makeGraphic()" on a FlxParticle variable.
Why does this happen, and other than modifying Flixel's source code or loading in custom graphic (from an embedded image), how can I create my custom particles?
