public DwarfCannon(Player player) { p = player; cannonLocation = p.getLocation(); fakeCannonLocation = new Location(cannonLocation.getX()+1, cannonLocation.getY()+1, cannonLocation.getY()); firing = false; cannonballs = 0; constructionStage = 0; direction = 0; setNpcsInArea(); newCannon(); }
public int distanceToPoint(Location l) { return (int) Math.Sqrt(Math.Pow(x - l.getX(), 2) + Math.Pow(y - l.getY(), 2)); }
public static bool inFightCave(Location l) { return(l.getX() >= 19000); }
public static bool inFightCave(Location l) { return l.getX() >= 19000; }
public int distanceToPoint(Location l) { return((int)Math.Sqrt(Math.Pow(x - l.getX(), 2) + Math.Pow(y - l.getY(), 2))); }