|
|
@ -82,8 +82,8 @@ public class Tank {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void fire(){
|
|
|
|
public void fire(){
|
|
|
|
int bX = this.x + Tank.WIDTH >> 1 - Bullet.WIDTH >> 1;
|
|
|
|
int bX = this.x + Tank.WIDTH / 2 - Bullet.WIDTH / 2;
|
|
|
|
int bY = this.y + Tank.HEIGHT >> 1 - Bullet.HEIGHT >> 1;
|
|
|
|
int bY = this.y + Tank.HEIGHT / 2 - Bullet.HEIGHT / 2;
|
|
|
|
tf.bullets.add(new Bullet(bX, bY, this.dir, this.tf));
|
|
|
|
tf.bullets.add(new Bullet(bX, bY, this.dir, this.tf));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|