FantasyRun/Tiles/tile_path.gd
Matthew Welch 5669da34c5 update type hints
fix issue with signal for tiles exiting the screen
2024-10-12 15:19:15 -07:00

27 lines
468 B
GDScript

extends Path3D
class_name TilePath
@onready var follow: PathFollow3D = $Follow as PathFollow3D
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