private void checkPlan()
{
// CHeck if plan is null or the square distance is to large
if (this.plan == null || DistanceCalculator.squareEuclidianDistance(base.targetLocation, Player.Instance.transform.position) >= base.minReachDistance)
{
base.resetTargetIndex();
base.setTarget(Player.Instance.transform.position);
this.getNewPlan(base.targetLocation);
}
}