示例#1
0
 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();
 }
示例#2
0
 public int distanceToPoint(Location l)
 {
     return (int) Math.Sqrt(Math.Pow(x - l.getX(), 2) + Math.Pow(y - l.getY(), 2));
 }
示例#3
0
 public static bool inFightCave(Location l)
 {
     return(l.getX() >= 19000);
 }
示例#4
0
 public static bool inFightCave(Location l)
 {
     return l.getX() >= 19000;
 }
示例#5
0
 public int distanceToPoint(Location l)
 {
     return((int)Math.Sqrt(Math.Pow(x - l.getX(), 2) + Math.Pow(y - l.getY(), 2)));
 }