wall.java

来自「一个坦克游戏的源代码」· Java 代码 · 共 23 行

JAVA
23
字号
import java.awt.*;
public class Wall {
	int x, y, w, h;
	TankClient tc;
	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;
	}
	public void draw(Graphics g)
	{
		g.fillRect(x, y, w, h);
	}
	public Rectangle getRect()
	{
		return new Rectangle(x,y,w,h);
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?