Allow the function for detecting enemy nearby to be based on a passed-in parameter
Sometimes you might not want to wait until the enemy is literally right beside you to see him as "nearby" - maybe you are doing some half-ranged attack like running punching