📄 wall.java
字号:
package com.bjsxt.tank.core;
import java.awt.Graphics;
import java.awt.Rectangle;
public abstract class Wall extends GameObject{
@Override
public void die() {
}
protected int width;
protected int height;
Rectangle rect = new Rectangle(x,y,width,height);
public Wall(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
rect.x = x;
rect.y = y;
rect.width = width;
rect.height = height;
}
public abstract void draw(Graphics g);
public Rectangle getRect() {
return this.rect;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -