restart level call deferred

This commit is contained in:
pennyrigate 2023-01-16 03:34:47 -05:00
parent 3247a67e96
commit 88b4135315
5 changed files with 20 additions and 21 deletions

View file

@ -253,7 +253,7 @@ func die():
Game.lives -= 1
Game.play_sound(Game.a_die,Game.ac_die)
if Game.lives < 0:
Game.restart_level()
Game.call_deferred("restart_level")
func _on_AnimationPlayer_animation_finished(anim_name):