public boolean touchDragged(int pX, int pY, int pointer) { float x = pX; float y = height - pY; replay.setPressed(replay.isInside(x, y)); menu.setPressed(menu.isInside(x, y)); return false; }
public boolean touchDown(int pX, int pY, int pointer, int button) { float x = pX; float y = height - pY; boolean value = false; if (replay.isInside(x, y)) { replay.setPressed(true); value |= true; } if (menu.isInside(x, y)) { replay.setPressed(true); value |= true; } return value; }
public boolean touchUp(int pX, int pY, int pointer, int button) { float x = pX; float y = height - pY; boolean value = false; if (replay.isInside(x, y)) { replay.setPressed(false); NerdShooter.shooter.setScreen(new GameScreen(level)); value |= true; } if (menu.isInside(x, y)) { menu.setPressed(false); NerdShooter.shooter.setScreen(StartScreen.instance); value |= true; } return value; }