summaryrefslogtreecommitdiff
path: root/Scenes/Maps/Map.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/Maps/Map.gd')
-rw-r--r--Scenes/Maps/Map.gd24
1 files changed, 24 insertions, 0 deletions
diff --git a/Scenes/Maps/Map.gd b/Scenes/Maps/Map.gd
new file mode 100644
index 0000000..4f57f0e
--- /dev/null
+++ b/Scenes/Maps/Map.gd
@@ -0,0 +1,24 @@
+extends Node
+
+func _ready():
+ self.add_hud()
+ self.add_menu()
+
+
+func add_hud():
+ var HUD = CanvasLayer.new()
+
+ var PlayerHealth = preload("res://Scenes/UI/HealthBar.tscn").instantiate();
+ HUD.add_child(PlayerHealth)
+ PlayerHealth.connect_to_player(Global.player)
+
+ add_child(HUD)
+
+
+func add_menu():
+ var MenuLayer = CanvasLayer.new()
+
+ var Menu = preload("res://Scenes/UI/Menu.tscn").instantiate()
+ MenuLayer.add_child(Menu)
+
+ add_child(MenuLayer)