Skip to content

Commit

Permalink
Merge pull request #110 from IQAndreas/fix-flxgroup-kill
Browse files Browse the repository at this point in the history
Add `FlxGroup::revive()`
  • Loading branch information
Dovyski committed Aug 20, 2013
2 parents 96ec8ce + 9755bca commit bdaeb9f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions org/flixel/FlxGroup.as
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,29 @@ package org.flixel
if((basic != null) && basic.exists)
basic.kill();
}

// Kill the group itself
super.kill();
}

/**
* Calls revive on the group itself and then on the group's members.
*/
override public function revive():void
{
// Revive the group itself
super.revive();

var basic:FlxBasic;
var i:uint = 0;
while(i < length)
{
basic = members[i++] as FlxBasic;
if((basic != null) && !basic.alive)
basic.revive();
}
}

/**
* Helper function for the sort process.
*
Expand Down

0 comments on commit bdaeb9f

Please sign in to comment.