public override void UpdateState(ShipAI controller) { SteerAction.SteerTowardsTarget(controller); float distance = Vector3.Distance(controller.wayPointList[controller.nextWayPoint].position, controller.transform.position); controller.throttle = distance > 30f ? 1f : 0f; }
public override void UpdateState(ShipAI controller) { SteerAction.SteerTowardsTarget(controller); if (CheckExitCondition(controller)) { controller.FinishOrder(); } }
public override void UpdateState(ShipAI controller) { SteerAction.SteerTowardsTarget(controller); PatrolWaypoints(controller); }