extends NPC const diffPerSecond = 5 var _arrived_distance_threshold = 0.1 var _interactArea: Area var _navPath: Path var _followPath: PathFollow var _current_nav_index = 0 func _ready(): #Logger.set_logger_level(Logger.LOG_LEVEL_FINE) _followPath = get_node("../") as PathFollow _navPath = get_node("../../") as Path var _interactArea = get_node("InteractArea") as Area assert(null != _interactArea) _interactArea.connect("area_entered", self, "_on_area_entered") func _process(_delta): # TODO: movement #if current_target: # should not be needed -> handled per navigation path if _followPath != null: _followPath.offset += diffPerSecond * _delta func _on_area_entered (area: Area): if area.is_in_group("FactoryEntry"): # despawn queue_free()