import java.awt.*;

public class CommonWall {
	public static final int width = 20; //设置墙的固定参数
	public static final int length = 20;
	int x, y;

	TankClient tc;
	private static Toolkit tk = Toolkit.getDefaultToolkit();
	private static Image[] wallImags = null;
	static {
		wallImags = new Image[] { // 储存commonWall的图片
		tk.getImage(CommonWall.class.getResource("Images/commonWall.gif")), };
	}

	public CommonWall(int x, int y, TankClient tc) { // 构造函数
		this.x = x;
		this.y = y;
		this.tc = tc; // 获得界面控制
	}

	public void draw(Graphics g) {// 画commonWall
		g.drawImage(wallImags[0], x, y, null);
	}

	public Rectangle getRect() {  //构造指定参数的长方形实例
		return new Rectangle(x, y, width, length);
	}
}
最近下载更多
bigcat12  LV5 2024年4月30日
krispeng  LV15 2024年4月16日
lwl1207  LV4 2023年8月29日
aa12356  LV1 2023年3月26日
hkxyyz  LV6 2023年3月2日
3043864991  LV2 2023年1月5日
jameshkj  LV8 2023年1月1日
冰锋之泪  LV7 2023年1月1日
337110415  LV7 2022年10月24日
2483935277  LV3 2022年9月3日
最近浏览更多
开膛手杰克哈哈哈  LV1 6月22日
147147 6月4日
暂无贡献等级
kkdulx  LV1 1月7日
aaaatw 1月3日
暂无贡献等级
鲁一宇  LV5 2024年12月24日
wyy1234 2024年7月16日
暂无贡献等级
bigcat12  LV5 2024年4月30日
krispeng  LV15 2024年4月16日
1511602303 2024年1月5日
暂无贡献等级
12345685  LV2 2024年1月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友