extends ConditionLeaf

@export var max_distance: float = 1.0


func tick(actor: Node, _blackboard: Blackboard) -> int:
	var mech: MechEnemy = actor as MechEnemy
	return SUCCESS if mech.nav_agent.distance_to_target() <= max_distance else FAILURE
