📄 way.java
字号:
package game;
import game.Client;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
public class Way {
int x,y, w, h;
Client tc=null;
public Way(int x, int y,int w,int h,Client tc) {
this.x = x;
this.y = y;
this.w=w;
this.h=h;
this.tc=tc;
}
public void draw(Graphics g){
Color c=g.getColor();
g.setColor(Color.GREEN);
g.fillRect(x, y, w, h);
g.setColor(c);
}
public Rectangle getRect(){ //获得墙的位置
return new Rectangle(x,y,w,h);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -