summaryrefslogtreecommitdiffstats
path: root/debug_info.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-28 19:00:05 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-28 19:05:06 +0200
commite07895be01b6bc7f813bbc392cc7852ffaf5e07b (patch)
tree0d925585d978e99e70549aa5e0eae49cac9b7947 /debug_info.gd
parent6173a0c4e1b41628532a37f0638339b0724b445e (diff)
Add debug info display
Diffstat (limited to 'debug_info.gd')
-rw-r--r--debug_info.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/debug_info.gd b/debug_info.gd
new file mode 100644
index 0000000..6a8c372
--- /dev/null
+++ b/debug_info.gd
@@ -0,0 +1,10 @@
+class_name DebugInfo
+extends CanvasLayer
+
+var player_state: PlayerState
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta: float) -> void:
+ var text = ""
+ if player_state: text += "%s\n" % player_state.to_string()
+ $Label.text = text