summaryrefslogtreecommitdiff
path: root/Levels/Level.gd
blob: 57288b24964a7a70ea0bd25dbb68fac4c07d42e5 (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
26
27
28
29
30
31
32
extends Node2D


export var starting_position = Vector2(0, 0)
export var camera_limit_left = 0
export var camera_limit_top = 0
export var camera_limit_right = 0
export var camera_limit_bottom = 0


var idx = 0

var HUD = CanvasLayer.new()

var timer = 0
var LabelTimer = preload("res://UI/HUD/Timer.tscn").instance()
var LevelMap = preload("res://UI/HUD/LevelMap.tscn").instance()


func _ready():
	self.HUD.add_child(self.LabelTimer)
	self.HUD.add_child(self.LevelMap)
	self.add_child(self.HUD)


func _process(delta):
	self.timer += delta
	self.LabelTimer.text = "%.2fs" % self.timer


func end_level():
	Global.end_level(self)