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));
}
}
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));
}
}
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);
}
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);
}
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);
}
Aggregations