code: private void checkTargetDistance(double dist)
      {
          if (distAttack.includes(dist))
          {
              if (checker.canAttack())
              {
                  state = AttackState.ATTACKING;
              }
          }
          else if (tick.elapsed(attackPause))
          {
              for (final AttackerListener listener : listeners)
              {
                  listener.notifyReachingTarget(target);
              }
          }
      }
docs: Check the target distance and update the attack state.
  
  @param dist The target distance.