Skip to content

Commit

Permalink
actors: Correctly initialise enemies on new level or retry
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jul 14, 2021
1 parent 7b64839 commit 7751506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions code/autoload/PlayerData.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -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")


Expand Down
2 changes: 0 additions & 2 deletions code/objects/Portal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7751506

Please # to comment.