From 2b0ca12ccd1d186984851a7364cc5afb37ac08f4 Mon Sep 17 00:00:00 2001 From: Armin Benz Date: Wed, 22 Nov 2017 17:20:52 +0100 Subject: [PATCH] commit old stuff from armins hdd --- .../game/world/entities/gameentities/PlayerEntity.java | 3 ++- .../samdev/colorrunner/screens/menu/SplashScreen.java | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/src/de/samdev/colorrunner/game/world/entities/gameentities/PlayerEntity.java b/core/src/de/samdev/colorrunner/game/world/entities/gameentities/PlayerEntity.java index 7a82630..7a85d34 100644 --- a/core/src/de/samdev/colorrunner/game/world/entities/gameentities/PlayerEntity.java +++ b/core/src/de/samdev/colorrunner/game/world/entities/gameentities/PlayerEntity.java @@ -81,7 +81,8 @@ public class PlayerEntity extends MovingEntity { ingameprefs.putInteger("currantlvl", currantlvl); ingameprefs.flush(); - if(currantlvl == 4) + int maximumlvl = 4; + if(currantlvl > maximumlvl) ((Game)Gdx.app.getApplicationListener()).setScreen(new MainMenu()); else CRGame.Inst().setScreen(new GameScreen(new StaticMapProvider(CRMapStorage.map_map.get(currantlvl)))); diff --git a/core/src/de/samdev/colorrunner/screens/menu/SplashScreen.java b/core/src/de/samdev/colorrunner/screens/menu/SplashScreen.java index 73fbcd5..c74feaa 100644 --- a/core/src/de/samdev/colorrunner/screens/menu/SplashScreen.java +++ b/core/src/de/samdev/colorrunner/screens/menu/SplashScreen.java @@ -30,17 +30,15 @@ public class SplashScreen implements Screen { Gdx.gl.glClearColor(1, 1, 1, 1); //Weiß Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - - sB.begin(); - sB.draw(logo, -9, - -8, 18, 16); + sB.draw(logo, -9,-8, 18, 16); sB.end(); - + } + + public void update(float delta) { loadTime += delta; if (loadTime > 0.9) ((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu()); - } @Override