diff options
author | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
commit | fb64f15e22acfc1c03c7c5357dd66077454adbcf (patch) | |
tree | 96cdbb8f59bd65609aa76276dfba94f9cdad33d4 /Levels/Level.gd |
Initial commit
Diffstat (limited to 'Levels/Level.gd')
-rw-r--r-- | Levels/Level.gd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Levels/Level.gd b/Levels/Level.gd new file mode 100644 index 0000000..f47f3a0 --- /dev/null +++ b/Levels/Level.gd @@ -0,0 +1,30 @@ +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() + + +func _ready(): + self.HUD.add_child(self.LabelTimer) + self.add_child(self.HUD) + + +func _process(delta): + self.timer += delta + self.LabelTimer.text = "%.2fs" % self.timer + + +func end_level(): + Global.end_level(self) |