rect.java
来自「WebHangman a game can be play on the web」· Java 代码 · 共 23 行
JAVA
23 行
package com.aztsoft.games.util;
public class Rect {
public int x;
public int y;
public int x2;
public int y2;
public int width;
public int height;
public Rect(int x, int y, int width, int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
x2 = x + width;
y2 = y + height;
}
public boolean isHit(int x1, int y1) {
return ((x1 > x && x1 < x + width) && (y1 > y && y1 < y + height));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?