Search in sources :

Example 1 with PantallaSplash

use of mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash in project AnotherMonekyParadox by SantiagoMille.

the class PantallaEasterEgg method render.

@Override
public void render(float delta) {
    borrarPantalla();
    batch.setProjectionMatrix(camara.combined);
    batch.begin();
    background.draw(batch);
    batch.end();
    stage.draw();
    if (Gdx.input.isKeyPressed(Input.Keys.BACK)) {
        main.setScreen(new PantallaSplash(main));
    }
}
Also used : PantallaSplash(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash)

Example 2 with PantallaSplash

use of mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash in project AnotherMonekyParadox by SantiagoMille.

the class PantallaHistoriaAstro method render.

@Override
public void render(float delta) {
    borrarPantalla();
    batch.setProjectionMatrix(camara.combined);
    batch.begin();
    background.draw(batch);
    batch.end();
    stage.draw();
    if (Gdx.input.isKeyPressed(Input.Keys.BACK)) {
        main.setScreen(new PantallaSplash(main));
    }
}
Also used : PantallaSplash(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash)

Example 3 with PantallaSplash

use of mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash in project AnotherMonekyParadox by SantiagoMille.

the class EscenaAstroGanador method crearBoton.

private void crearBoton() {
    // Boton Home
    assetManager.load("boton Home.png", Texture.class);
    assetManager.finishLoading();
    imgBoton = assetManager.get("boton Home.png");
    stageNivel = new Stage(vista);
    texto1 = new Texto(1, 1, 1);
    texto2 = new Texto(1, 1, 1);
    TextureRegionDrawable btnHome = new TextureRegionDrawable(new TextureRegion(imgBoton));
    home = new ImageButton(btnHome);
    home.setSize(155, 155);
    home.setPosition(ANCHO * 2 / 10, ALTO / 2);
    home.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            main.setScreen(new PantallaSplash(main));
        }
    });
    // Boton Next
    assetManager.load("PlayButton.png", Texture.class);
    assetManager.finishLoading();
    imgBN = assetManager.get("PlayButton.png");
    TextureRegionDrawable btnNext = new TextureRegionDrawable(new TextureRegion(imgBN));
    next = new ImageButton(btnNext);
    next.setSize(155, 155);
    next.setPosition(ANCHO * 7 / 10, ALTO / 2);
    next.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            if (nivel == 2) {
                main.setScreen(new PantallaCinematica(main, "Cinematicas/C N1.png", 2, score, vidas, granadas));
            } else if (nivel == 3) {
                main.setScreen(new PantallaCinematica(main, "Cinematicas/C N2.png", 3, score, vidas, granadas));
            } else if (nivel == 4) {
                main.setScreen(new PantallaCinematica(main, "Cinematicas/C N3W.png", 4, score, vidas, granadas));
            } else if (nivel == 44) {
                main.setScreen(new PantallaCinematica(main, "Cinematicas/C N4.png", 44, score, vidas, granadas));
            }
        }
    });
    stageNivel.addActor(home);
    stageNivel.addActor(next);
    Gdx.input.setInputProcessor(stageNivel);
}
Also used : TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) Stage(com.badlogic.gdx.scenes.scene2d.Stage) TextureRegionDrawable(com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable) PantallaSplash(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) Texto(mx.itesm.another_monkey_paradox.Utils.Texto) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Example 4 with PantallaSplash

use of mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash in project AnotherMonekyParadox by SantiagoMille.

the class EscenaAstroMuerto method crearBoton.

private void crearBoton() {
    assetManager.load("regresar.png", Texture.class);
    assetManager.load("HistoriaAstro/right-arrow_w.png", Texture.class);
    assetManager.finishLoading();
    imgBoton = assetManager.get("regresar.png");
    imgBotonHome = assetManager.get("HistoriaAstro/right-arrow_w.png");
    stageNivel = new Stage(vista);
    texto = new Texto(1, 1, 1);
    TextureRegionDrawable btnHome = new TextureRegionDrawable(new TextureRegion(imgBoton));
    home = new ImageButton(btnHome);
    if (!isThirdLevel) {
        home.setPosition(ANCHO / 2 - imgBoton.getWidth() / 2, -100);
        home.addAction(Actions.moveTo(ANCHO / 2 - imgBoton.getWidth() / 2, ALTO / 5 - imgBoton.getHeight() / 2, 0.6f));
    } else {
        home.setPosition(-500, -100);
    }
    home.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            main.setScreen(new PantallaSplash(main));
        }
    });
    TextureRegionDrawable btnRregresar = new TextureRegionDrawable((new TextureRegion(imgBotonHome)));
    regresar = new ImageButton(btnRregresar);
    if (isThirdLevel) {
        regresar.setPosition(ANCHO - 103, ALTO - 25 - regresar.getHeight());
    } else {
        regresar.setPosition(-500, ALTO - 30 - regresar.getHeight());
    }
    regresar.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            main.setScreen(new PantallaCargandoStoryMode(main, 1, 0, 3, 5));
        }
    });
    stageNivel.addActor(home);
    stageNivel.addActor(regresar);
    Gdx.input.setInputProcessor(stageNivel);
}
Also used : TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) PantallaCargandoStoryMode(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaCargandoStoryMode) Stage(com.badlogic.gdx.scenes.scene2d.Stage) TextureRegionDrawable(com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable) PantallaSplash(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) Texto(mx.itesm.another_monkey_paradox.Utils.Texto) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Example 5 with PantallaSplash

use of mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash in project AnotherMonekyParadox by SantiagoMille.

the class PantallaCinematica method crearMenu.

private void crearMenu() {
    stageMenu = new Stage(vista);
    imgBackground = new Texture(this.background);
    spriteBackground = new Sprite(imgBackground);
    // Boton Next
    TextureRegionDrawable trdNext = new TextureRegionDrawable(new TextureRegion(new Texture("HistoriaAstro/right-arrow_w.png")));
    ImageButton btnNext = new ImageButton(trdNext);
    btnNext.setPosition(ANCHO - 100, ALTO - 30 - btnNext.getHeight());
    btnNext.addListener(new ClickListener() {

        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            // Gdx.app.log("ClickListener","Si se clickeoooo");
            if (nivel == 2) {
                main.setScreen(new PantallaCargandoStoryMode(main, 2, score, vidas, granadas));
            } else if (nivel == 3) {
                main.setScreen(new PantallaCargandoStoryMode(main, 3, score, vidas, granadas));
            } else if (nivel == 4) {
                main.setScreen(new PantallaCargandoStoryMode(main, 4, score, vidas, granadas));
            } else if (nivel == 44) {
                main.setScreen(new PantallaSplash(main));
            }
        }
    });
    stageMenu.addActor(btnNext);
    Gdx.input.setInputProcessor(stageMenu);
}
Also used : TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) PantallaCargandoStoryMode(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaCargandoStoryMode) Stage(com.badlogic.gdx.scenes.scene2d.Stage) TextureRegionDrawable(com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable) PantallaSplash(mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) Texture(com.badlogic.gdx.graphics.Texture) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Aggregations

PantallaSplash (mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaSplash)5 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)3 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)3 Stage (com.badlogic.gdx.scenes.scene2d.Stage)3 ImageButton (com.badlogic.gdx.scenes.scene2d.ui.ImageButton)3 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)3 TextureRegionDrawable (com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable)3 PantallaCargandoStoryMode (mx.itesm.another_monkey_paradox.PantallasDeCarga.PantallaCargandoStoryMode)2 Texto (mx.itesm.another_monkey_paradox.Utils.Texto)2 Texture (com.badlogic.gdx.graphics.Texture)1 Sprite (com.badlogic.gdx.graphics.g2d.Sprite)1