so pretty much i made a game that if you miss the target on screen the game is over, it works on my computer because it is a single click in a location but doesn’t register on android because i feel like my finger is dragging by accident. i want the game to be over at the end of the drag in libgdx and am not sure how to go about it.
like why does it work perfect on my computer and an only if i tap like soft on android. this was the code.
stage.addListener(new ClickListener()
{
@Override
public void clicked(InputEvent event, float x, float y)
{
int randomX2 = (int)MathUtils.random(100,500);
int randomY2 = (int)MathUtils.random(100,500);
if(box.equals(stage.hit(x,y,false)))
{
box.setPosition(randomX2, randomY2);
System.out.println("hit");
score++;
}
else
{
System.out.println("miss");
state = GameState.GAMEOVER;
}
}
});