Exemple #1
0
 public Bullet(
     float x,
     float y,
     float manx,
     float many,
     int id,
     boolean moving,
     Player player,
     Human human) {
   angle = Math.atan2(y - many, x - manx);
   this.moving = moving;
   if (this.moving) {
     this.x = manx;
     this.y = many;
   }
   if (!this.moving) {
     this.x = x;
     this.y = y;
   }
   originX = manx;
   originY = many;
   this.human = human;
   this.player = player;
   this.ENTITYID = id;
   try {
     image = new Image("res/bullet.png");
     image.setFilter(Image.FILTER_NEAREST);
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }