From 16bf959cd60a79fe906ad7e64574e4a77bd80517 Mon Sep 17 00:00:00 2001 From: rom Date: Mon, 26 Apr 2021 21:45:31 +0200 Subject: peaceful --- scenes/levels/base_level.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scenes/levels/base_level.gd') diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index e7db980..4c1ef70 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -55,9 +55,12 @@ func _on_Level_lost_heart(instakill): if instakill: _health = 0 _health -= 1 + _health = 10 + _health_bar.set_health(_health) + if instakill: + _load_next_level() if _health <= 0: get_tree().change_scene("res://scenes/game_over.tscn") - _health_bar.set_health(_health) func _load_next_level(): _unload_current_level() -- cgit