TankMovement.checkPlan C# (CSharp) Method

checkPlan() private method

Checks the plan and sees if it needs to be updated
private checkPlan ( ) : void
return void
    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);
        }
    }