package barrier; import java.awt.Graphics; import java.awt.Image; import javax.swing.ImageIcon; public class Barrier { private static final int SIZE = 50; private int x; private int y; private int hp; private ImageIcon face=null; public Barrier(int x,int y) { this.x=x; this.y=y; face=new ImageIcon(); } public void draw(Graphics g) { try { } catch (Exception e) { // TODO: handle exception } g.drawImage(face.getImage(), x, y, x+SIZE, y+SIZE, 0,0,face.getIconWidth(), face.getIconHeight(), null); } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } public int getHp() { return hp; } public void setHp(int hp) { this.hp = hp; } public Image getFace() { return face.getImage(); } public void setFace(Image face) { this.face.setImage(face); } }
最近下载更多
niuiniu LV1
2023年6月13日
微信网友_6302411874422784 LV1
2023年1月12日
哇撒是大帅耶 LV3
2022年12月17日
1120460912 LV1
2022年10月2日
agjbvfhjbg LV6
2022年9月10日
最代码-宋家辉 LV61
2022年5月28日
lizhenlinok LV10
2021年1月11日
为erwe LV1
2020年9月22日
long8890 LV1
2020年8月31日
春风吹否 LV1
2020年7月27日