extends ProgressBar

@onready var _ride_manager: RideManager = RideManager.get_instance()
@onready var _track: Globals.Track = Globals.get_current_track()


func _ready() -> void:
	_ride_manager.distance_changed.connect(_on_distance_changed)

func _on_distance_changed(_distance: int) -> void:
	value = _ride_manager.current_distance / float(_track.distance) * max_value
