diff --git a/code/autoload/PlayerData.gd b/code/autoload/PlayerData.gd index 5807aaa..8dc8f72 100644 --- a/code/autoload/PlayerData.gd +++ b/code/autoload/PlayerData.gd @@ -134,6 +134,7 @@ func new_level(): retry_chutes = chutes retry_health = health retry_score = score + get_tree().call_group("enemies", "queue_free") emit_signal("new_level") @@ -148,6 +149,7 @@ func retry_level(): score = retry_score time_limit = 300 time_remaining = 300 + get_tree().call_group("enemies", "queue_free") emit_signal("new_level") diff --git a/code/objects/Portal.gd b/code/objects/Portal.gd index 3674db6..2bab2b6 100644 --- a/code/objects/Portal.gd +++ b/code/objects/Portal.gd @@ -29,8 +29,6 @@ func _ready(): func fly_helicopter(skip_animation: bool = false): - get_tree().call_group("enemies", "queue_free") - if not skip_animation: anim_helicopter.play("spin_up") yield(anim_helicopter, "animation_finished")