-3
我想弄清楚我的对象是否被打了一点点宽容。但它不起作用。这里是我的代码:如果条件没有执行
public boolean isClicked(float x) {
if (Gdx.input.isTouched() && Gdx.graphics.getHeight() - Gdx.input.getY() >= this.getY() && Gdx.graphics.getHeight() - Gdx.input.getY() <= this.getY() + this.getHeight() && this.getWidth() >= Gdx.input.getX() && x < this.getY() + this.getHeight() * 1.2f && x > this.getY() - this.getHeight() * .2f) {
return true;
}
return false;