From a27ed68d23589e59f29c51b365bdcab1bb32c3d3 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Tue, 10 Oct 2023 20:11:09 -0400 Subject: [PATCH] can I die now? --- Scripts/Enemy.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Scripts/Enemy.gd b/Scripts/Enemy.gd index 4cde2dd..53c683d 100644 --- a/Scripts/Enemy.gd +++ b/Scripts/Enemy.gd @@ -44,8 +44,6 @@ func _ready(): atk1r.set_disabled(true) atk2l.set_disabled(true) atk2r.set_disabled(true) - list.append($"../BatSpawnable") - list.append($"../BatSpawnable2") # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -199,7 +197,10 @@ func _on_sprite_animation_looped(): attack() else: currAtks = maxAtks - is_dying = false + if (is_dying): + queue_free() + else: + is_dying = false func _on_attack_area_body_entered(body):