diff options
author | rom <romangraef@gmail.com> | 2021-04-26 21:45:31 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-26 21:45:31 +0200 |
commit | 16bf959cd60a79fe906ad7e64574e4a77bd80517 (patch) | |
tree | 59b20568016840cbbd8fe2d5811d4563ad8835f5 /scenes/levels/base_level.gd | |
parent | d44dfdce553254fed44c58a25fd4d5235fdc1326 (diff) | |
download | ldjam48-16bf959cd60a79fe906ad7e64574e4a77bd80517.tar.gz ldjam48-16bf959cd60a79fe906ad7e64574e4a77bd80517.tar.bz2 ldjam48-16bf959cd60a79fe906ad7e64574e4a77bd80517.zip |
peaceful
Diffstat (limited to 'scenes/levels/base_level.gd')
-rw-r--r-- | scenes/levels/base_level.gd | 5 |
1 files changed, 4 insertions, 1 deletions
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() |