diff options
author | rom <romangraef@gmail.com> | 2021-04-25 23:55:11 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-25 23:55:18 +0200 |
commit | 02019c028d46fd3ce98d022f72862f735ca9229c (patch) | |
tree | 22b7a97e979aad715f3a9921680d63e41c1be1a0 /scenes/levels/base_level.gd | |
parent | b43f35d2183ab5fd236ad9c04b7da0cadf55ba00 (diff) | |
download | ldjam48-02019c028d46fd3ce98d022f72862f735ca9229c.tar.gz ldjam48-02019c028d46fd3ce98d022f72862f735ca9229c.tar.bz2 ldjam48-02019c028d46fd3ce98d022f72862f735ca9229c.zip |
hearts and base lebel
Diffstat (limited to 'scenes/levels/base_level.gd')
-rw-r--r-- | scenes/levels/base_level.gd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index d3a17a6..f7d9cbe 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -7,7 +7,7 @@ onready var _path_renderer : PathRenderer = $PathRenderer onready var _health_bar = $Camera2D/healthbar onready var _last_camera_location : Vector2 = $Camera2D.position const _levels = [ - preload("res://scenes/levels/repeat_this.tscn") + preload("res://scenes/levels/level1.tscn") ] var _current_level = 0 @@ -17,7 +17,7 @@ var _health = 10 # Called when the node enters the scene tree for the first time. func _ready(): - _health_bar.maxhealth = 10 + _health_bar.set_health(10) _load_current_level() func _get_next_level_pos() -> Vector2: @@ -52,6 +52,7 @@ func _load_next_level(): _current_level += 1 if _current_level > _levels.size(): get_tree().change_scene("res://scenes/menu.tscn") + return _load_current_level() func _unload_current_level(): |