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);
	}
}
最近下载更多
krispeng  LV7 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日
微信网友_5926336788320256  LV6 2022年5月24日
最近浏览更多
krispeng  LV7 4月16日
1511602303 1月5日
暂无贡献等级
12345685  LV2 1月2日
求学的熊猫  LV6 2023年12月27日
冰箱里的凳子 2023年12月14日
暂无贡献等级
法拉利  LV1 2023年12月12日
邹梓尧 2023年12月3日
暂无贡献等级
wangbo21  LV1 2023年11月16日
jkjfdgbkl  LV2 2023年11月1日
lwl1207  LV4 2023年8月29日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友