⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wall.java

📁 简单的坦克大战 可以打敌人 更多功能还在编写当中
💻 JAVA
字号:
import java.awt.*;


public class Wall {
	
	private int x, y, width, height;
	
	TankFrame tf;
	
	public Wall(int x, int y, int width, int height, TankFrame tf) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		this.tf = tf;
	}
	
	public void draw(Graphics g) {
		Color c = g.getColor();
		g.setColor(Color.PINK);
		g.fillRect(x, y, width, height);
		g.setColor(c);
	}
	
	public Rectangle getRect() {
		return new Rectangle(x, y, width, height);
	}
	
}

⌨️ 快捷键说明

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