Ejemplo n.º 1
0
  protected void asignarBordes() {
    bordes =
        new Rectangle(
            posicion.x,
            posicion.y,
            Textura.getWidth() * adventures.getDiv(),
            Textura.getHeight() * adventures.getDiv());

    int altoPantalla = 0;
    if (Gdx.app.getType() == ApplicationType.Desktop) altoPantalla = 754;
    else if (Gdx.app.getType() == ApplicationType.Android) altoPantalla = Gdx.graphics.getHeight();
    xMinima = posicion.x;
    yMaxima = altoPantalla - posicion.y;
    xMaxima = posicion.x + bordes.width;
    yMinima = altoPantalla - (posicion.y + bordes.height);
  }
Ejemplo n.º 2
0
 public void update() {
   if (sePulsaElBoton() && tiempoPulsacion == 0) {
     if (adventures.isSonidoActivado()) sonidoBoton.play();
     funcionamiento();
     tiempoPulsacion = Constant.TIEMPO_BOTON;
   } else if (tiempoPulsacion > 0) tiempoPulsacion--;
 }
 public BotonNivel6(AdventuresOfManuel adventures, Vector2 posicion) {
   super(adventures, posicion);
   Textura = adventures.getManager().get("Pantallas/6.png", Texture.class);
   asignarBordes();
 }
Ejemplo n.º 4
0
 public Boton(AdventuresOfManuel adventures, Vector2 posicion) {
   this.adventures = adventures;
   this.posicion = posicion;
   tiempoPulsacion = 0;
   sonidoBoton = adventures.getManager().get("Musica/Button.mp3", Sound.class);
 }