extends Sprite2D

var height: int = int(region_rect.size.y)


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


func _on_distance_changed(pixels: int) -> void:
	region_rect.position.y = int(region_rect.position.y - pixels) % height
