summaryrefslogtreecommitdiff
path: root/scenes/levels/base_level.gd
diff options
context:
space:
mode:
authorrom <romangraef@gmail.com>2021-04-26 21:45:31 +0200
committerrom <romangraef@gmail.com>2021-04-26 21:45:31 +0200
commit16bf959cd60a79fe906ad7e64574e4a77bd80517 (patch)
tree59b20568016840cbbd8fe2d5811d4563ad8835f5 /scenes/levels/base_level.gd
parentd44dfdce553254fed44c58a25fd4d5235fdc1326 (diff)
downloadldjam48-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.gd5
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()