From 46556d864b9685c3b09a0038f5de83966fe7ff94 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 10 Aug 2023 11:48:05 +0200 Subject: Initial commit --- Scenes/Maps/Map.gd | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Scenes/Maps/Map.gd (limited to 'Scenes/Maps/Map.gd') 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) -- cgit v1.2.3