Beeblerox/HaxeFlixel — pull request #314 by Gama11 (2013-05-02 08:13:58+00:00)
Title: FlxParticle / FlxEmitter improvements

I added the features mentioend in #304.

`FlxParticle` has now 2 more boolean variables: `decreasingSize` and `fadingAway` (feel free to suggest better names for either of them). They can be used in conjunction and are based on `lifespan`, which makes them really easy to use. This also required the addition of the `maxLifespan` variable. It's a really nice effect and looks much better.
The implementation is really simple. Both `scale` and `alpha` are decremented each frame so that `scale` / `alpha` will be nearly zero when the particle's `lifespan` has expired. However, this may cause trouble if particles start with a `scale` level / `alpha` value different than one. Two additional variables would be required to make that work propery, which save the initial values for those properties. Not sure if this is worth adding.

You can use the features simply by setting the flags to true and using a `lifespan` other than 0. It also works with `FlxEmitterExt`:

```AS3
var emitter:FlxEmitter;
emitter.sizeDecreasing = true;
emitter.fadingAway = true;
add(emitter);
emitter.start(true, 2);
```

I've also created a really [simple demo](https://dl.dropboxusercontent.com/u/18627942/Demos/index.html) to show this off. I guess I'll upload it to the haxeflixel-site some time soon, unless you want me to add any features / make any changes to it.

I have also added the line `exists = false` to the constructor of `FlxParticle`. This fixes a bug where you create particles for an emitter without using `makeParticles` which normally does that flag (I guess technically, that line could be removed from there, which I didn't do). The particles wouldn't have a graphic / use the flixel logo. I don't think this causes any issues, but I can't be a 100% sure.