]> Untitled Git - baabarian.git/blob - class/ux/debug_overlay.gd
Finished basic movement, collision, visuals
[baabarian.git] / class / ux / debug_overlay.gd
1 extends CanvasLayer
2 class_name DebugOverlay
3
4
5 @onready var draw = $DebugDraw3D
6 @onready var stats = $DebugStats
7
8
9 func _ready():
10         if not InputMap.has_action("toggle_debug"):
11                 InputMap.add_action("toggle_debug")
12                 var ev = InputEventKey.new()
13                 ev.physical_keycode = KEY_BACKSLASH
14                 InputMap.action_add_event("toggle_debug", ev)
15
16
17 func _input(event):
18         if event.is_action_pressed("toggle_debug"):
19                 self.visible = not self.visible