small racing game im working on
Diffstat (limited to 'ui/gears.gd')
| -rw-r--r-- | ui/gears.gd | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/gears.gd b/ui/gears.gd new file mode 100644 index 0000000..54ba49a --- /dev/null +++ b/ui/gears.gd @@ -0,0 +1,10 @@ +extends RichTextLabel + +@export var car: Node3D + +# assumes 6 gear + rev +const F_STRING = "[center] [b]%s[/b][/center]" +const GEARS: PackedStringArray = ["[color=#4682b4]N[/color]", "1", "2", "3", "4", "5", "6", "[color=#d84341]R[/color]"] + +func _process(_delta: float) -> void: + text = F_STRING % GEARS[car.current_gear] |