godot: add initial game
This commit is contained in:
15
game/player_debug.gd
Normal file
15
game/player_debug.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends CanvasLayer
|
||||
|
||||
@onready var debug_text = $PlayerDebugText
|
||||
|
||||
var stats: Dictionary = {}
|
||||
|
||||
func add_stat(name: String, value: String):
|
||||
stats[name] = value
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
debug_text.clear()
|
||||
for key in stats:
|
||||
var value = stats[key]
|
||||
debug_text.append_text("%s: %s\n" % [key, value])
|
||||
|
Reference in New Issue
Block a user