代码格式

master
kn5886348135 4 years ago
parent b53ad2ca36
commit 90d7c933ba

@ -11,9 +11,7 @@ public class Bullet {
private Dir dir; private Dir dir;
private boolean living = true; private boolean living = true;
TankFrame tf = null;
private TankFrame tf = null;
private Group group = Group.BAD; private Group group = Group.BAD;
public Bullet(int x, int y, Dir dir, Group group, TankFrame tf) { public Bullet(int x, int y, Dir dir, Group group, TankFrame tf) {
@ -24,6 +22,14 @@ public class Bullet {
this.tf = tf; this.tf = tf;
} }
public Group getGroup() {
return group;
}
public void setGroup(Group group) {
this.group = group;
}
public void paint(Graphics g) { public void paint(Graphics g) {
if (!living) { if (!living) {
tf.bullets.remove(this); tf.bullets.remove(this);

@ -105,15 +105,14 @@ public class Tank {
move(); move();
} }
public void setDir(Dir dir) {
this.dir = dir;
}
public void setMoving(boolean moving) { public void setMoving(boolean moving) {
this.moving = moving; this.moving = moving;
} }
public void setDir(Dir dir) {
this.dir = dir;
}
public void setX(int x) { public void setX(int x) {
this.x = x; this.x = x;
} }

Loading…
Cancel
Save