Author Topic: Doubt about killing  (Read 943 times)

Foxtacy

  • Aspiring Indie Game Developer, Prototype Musician, Lame Pixel Artist
  • Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
    • Need songs? :3
Doubt about killing
« on: Tue, Jan 24, 2012 »
Good day guys!

Despite the name of the post, this is not a psycopath question.

The thing is.

What happens when i group.kill() ?

does it automatically kills all the objects inside my group or, does it kill the group but keeps the object within alive?

« Last Edit: Tue, Jan 24, 2012 by Foxtacy »
Waiting is wasting

Wing Eraser

  • Guest
Re: Doubt about killing
« Reply #1 on: Tue, Jan 24, 2012 »
Have you tried to look at the code what it does? There is also a description attached at the method.
Code: [Select]
/**
 * Calls kill on the group's members and then on the group itself.
 */
override public function kill():void
{
var basic:FlxBasic;
var i:uint = 0;
while(i < length)
{
basic = members[i++] as FlxBasic;
if((basic != null) && basic.exists)
basic.kill();
}
super.kill();
}

Foxtacy

  • Aspiring Indie Game Developer, Prototype Musician, Lame Pixel Artist
  • Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
    • Need songs? :3
Re: Doubt about killing
« Reply #2 on: Wed, Jan 25, 2012 »
Hey thanks! that was helpful :D
Waiting is wasting