From ed567bda49ed674c8995309fb905d6df10185724 Mon Sep 17 00:00:00 2001 From: Jonas Bernard Date: Mon, 26 Apr 2021 18:45:58 +0200 Subject: Game Over --- scenes/levels/base_level.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scenes/levels') diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index 66085c5..29f72d7 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -47,8 +47,8 @@ func _on_Level_lost_heart(instakill): if instakill: _health = 0 _health -= 1 - if _health == 0: - pass # TODO: lose scenario + if _health <= 0: + get_tree().change_scene("res://scenes/game_over.tscn") _health_bar.set_health(_health) func _load_next_level(): -- cgit