i have created a rectangle
public Rectangle rectangle_hitbox;
It has the coordinates and dimensions of the enemies. In the render method, I want that when this rectangle is pressed, the string "Done" is printed. I tried with:
if(Gdx.input.isTouched()){
System.out.println("Done");
} else {
System.out.println("Missed");
}
But it works anywhere on the map and not only in rectangles