class_name OverworldPath extends Path2D @export var next_direction: Array[String] = [ "up", "down", "left", "right", ] @export_node_path("OverworldPath") var _next_path: NodePath @export var previous_direction: Array[String] = [ "up", "down", "left", "right", ] @export_node_path("OverworldPath") var _previous_path: NodePath var next_path: OverworldPath var previous_path: OverworldPath var progress: float: set(value): $PathFollow2D.progress_ratio = value get: return $PathFollow2D.progress_ratio var current_position: Vector2: get: return $PathFollow2D.position func _ready(): if _next_path: next_path = get_node(_next_path) if _previous_path: previous_path = get_node(_previous_path)