HaxeFlixel objects use an alive
flag to easily set/determine how they should act. Dead (alive == false
) objects do not have update()
called on them, by default.
You can use FlxBasic.kill()
to set alive
and exists
to false
simultaneously, and FlxBasic.revive()
to set them to true
.
// kill object
object.kill();
// revive object
object.revive();