Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
  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;
  }
Exemplo n.º 3
0
  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;
  }