summaryrefslogtreecommitdiff
path: root/Scenes/Maps/Map.gd
blob: 8e369f6cc0ad7f266ada5e595b9aa9cc929ff240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)