FlixelCommunity / flixel

Community fork of Adam “Atomic” Saltsman's popular game engine Flixel. Distilled from a variety of Flash games he worked on over the last couple years, including Gravity Hook, Fathom and Canabalt, its primary function is to provide some useful base classes that you can extend to make your own game objects.
http://flixelcommunity.org/
Other
84 stars 17 forks source link

Update FlxGroup.as #161

Closed creadicted closed 11 years ago

creadicted commented 11 years ago

don't think it is the nicest solution but I really miss a function to clear a group without destroying it.

Dovyski commented 11 years ago

Thanks for the pull request, @creadicted ! Even though your addition is great, I think it is already covered by method callAll() of FlxGroup.

That method walks through all elements in the group, calling an specific method on every member. You could do something like:

var group :FlxGroup = new FlxGroup();
...
group.callAll("kill");

How about that?

creadicted commented 11 years ago

You are right. :/ I didn't thought about that. :) Thank you

Dovyski commented 11 years ago

You're welcome! :)