-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;