I have never used this method before, but I need to use it for the game I am creating. I need the enemy in my game to detect when the Hero (Guy) is within its shooting range. I have looked through some other posts on this site, but I still cannot fully grasp how to use it.
So far, I have this in my enemy:
public boolean isGuyInRange()
{
Guy Guy;
Guy = (Guy)getObjectsInRange(1200, Guy.class);
return Guy != null;
if(Guy != null)
{
System.out.println("Working");
}
}
This compiles an error of "unreachable statement", and I have not been able to get past this point. Any help?

