2024-10-05 14:09:45 -07:00
|
|
|
extends Path3D
|
|
|
|
class_name TilePath
|
|
|
|
|
2024-10-12 15:19:15 -07:00
|
|
|
@onready var follow: PathFollow3D = $Follow as PathFollow3D
|
2024-10-05 14:09:45 -07:00
|
|
|
|
|
|
|
var _marker: Marker3D
|
|
|
|
var marker: Marker3D:
|
|
|
|
get:
|
|
|
|
if not has_progress_marker():
|
|
|
|
create_marker()
|
|
|
|
return _marker
|
|
|
|
|
|
|
|
|
|
|
|
func has_progress_marker() -> bool:
|
|
|
|
return _marker != null
|
|
|
|
|
|
|
|
|
|
|
|
func create_marker() -> Marker3D:
|
|
|
|
_marker = Marker3D.new()
|
|
|
|
follow.add_child(_marker)
|
|
|
|
return _marker
|
|
|
|
|
|
|
|
|
|
|
|
func receive_marker(node: Marker3D) -> void:
|
|
|
|
node.reparent(follow)
|
|
|
|
_marker = node
|