small racing game im working on
Diffstat (limited to 'ui/splits/splits.gd')
-rw-r--r--ui/splits/splits.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/splits/splits.gd b/ui/splits/splits.gd
new file mode 100644
index 0000000..a446b37
--- /dev/null
+++ b/ui/splits/splits.gd
@@ -0,0 +1,13 @@
+extends VBoxContainer
+
+@export var diff: PanelContainer
+@export var current: Label
+
+var timer: SceneTreeTimer
+
+func update(time: float, prev_time: float) -> void:
+ show()
+ diff.update(time, prev_time)
+ current.text = GameTimer.format(time)
+ timer = get_tree().create_timer(5)
+ timer.timeout.connect(hide) \ No newline at end of file