📄 wall.java
字号:
import java.awt.*;
public class Wall {
public Wall( int x, int y, int w, int h, TankClient tc) {
this.h = h;
this.tc = tc;
this.w = w;
this.x = x;
this.y = y;
}
int x, y, w, h;
TankClient tc ;
public void draw(Graphics g) {
Color c = g.getColor();
g.setColor(Color.lightGray);
g.fillRect(x, y, w, h);
// g.fillRect(200, 100, 300, 15);
// g.fillRect(250, 150, 200, 15);
// g.fillRect(160, 200, 380, 15);
// g.fillRect(525, 200, 15, 200);
// g.fillRect(350, 70, 15, 400);
// g.fillRect(510, 385, 15, 15);
// g.fillRect(495, 370, 15, 15);
g.setColor(c);
}
public Rectangle getRect() {
return new Rectangle(x,y,w,h);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -