small racing game im working on
Diffstat (limited to 'ui/revs.gd')
-rw-r--r--ui/revs.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/revs.gd b/ui/revs.gd
new file mode 100644
index 0000000..f4ecbf8
--- /dev/null
+++ b/ui/revs.gd
@@ -0,0 +1,10 @@
+extends Label
+
+@export var f_string = " %drpm"
+var car: Car
+
+func _process(_delta: float) -> void:
+ text = f_string % car.rpm()
+
+func assigned(_car: Car) -> void:
+ car = _car