I use many FlxTypedGroups as object pools in my project, for bullets,particles, explosions,etc.
And everytime I create one, I seem to use the same 4-5 lines of code to init them and fill them with the objects.
I was wondering if there is a way to share that functionality and use something like:
var pool_bullets:FlxTypedGroup<Bullet> = createPool(Bullet,20);
createPool should return a new FlxTypedGroup<Bullet> object filled with 20 Bullet, instances.
Haxe seems like a powerful language, but I can't seem to get into some of the more advanced features, like these kind of generics.
thanks!