CommitforMike

This commit is contained in:
Armin Benz 2017-04-13 23:30:38 +02:00
parent f025501d37
commit d5495c2f48
8 changed files with 25 additions and 29 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -10,9 +10,9 @@ public class CRGame extends Game {
@Override
public void create() {
if (DEBUG)
setScreen(new GameScreen());
else
//if (DEBUG)
// setScreen(new GameScreen());
//else
setScreen(new SplashScreen());
}
}

View File

@ -3,6 +3,7 @@ package de.samdev.colorrunner.game.world;
import java.util.ArrayList;
import java.util.List;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
@ -20,6 +21,8 @@ import de.samdev.colorrunner.game.world.map.CRMapStorage;
import de.samdev.colorrunner.game.world.map.CRTiledMap;
import de.samdev.colorrunner.game.world.map.MapSection;
import de.samdev.colorrunner.input.GameInputListener;
import de.samdev.colorrunner.screens.gameScreen.GameScreen;
import de.samdev.colorrunner.screens.menu.MainMenu;
public class CRGameWorld implements GameInputListener {
public PlayerEntity player;
@ -58,7 +61,11 @@ public class CRGameWorld implements GameInputListener {
else
entities.remove(i);
}
if(player.getPosition().y < - 10)
{
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
}
expandMap();
}

View File

@ -1,5 +1,7 @@
package de.samdev.colorrunner.game.world.entities.gameentities;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import de.samdev.colorrunner.game.renderer.CRAssets;
@ -8,6 +10,7 @@ import de.samdev.colorrunner.game.world.SwipeDirection;
import de.samdev.colorrunner.game.world.entities.CRGameEntity;
import de.samdev.colorrunner.game.world.entities.GravityEntity;
import de.samdev.colorrunner.game.world.entities.gameentities.floor.FloorTileEntity;
import de.samdev.colorrunner.screens.menu.MainMenu;
public class PlayerEntity extends GravityEntity {
public final static float PLAYER_WIDTH = 32;

View File

@ -4,6 +4,8 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.input.GestureDetector;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import de.samdev.colorrunner.game.renderer.CRGameRenderer;
import de.samdev.colorrunner.game.world.AverageExecutionLogger;

View File

@ -16,46 +16,30 @@ public class SplashScreen implements Screen {
private float loadTime = 0;
private int random = MathUtils.random(5);
private Texture logo = new Texture("images/samlogo.png");
private Texture logo = new Texture("images/blackforestbytes_appstart.png");
private OrthographicCamera cam = new OrthographicCamera();
private SpriteBatch sB;
@Override
public void render(float delta) {
if(random == 0){
Gdx.gl.glClearColor(0.4f, 0, 0, 1); // Rot
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}else if (random == 1){
Gdx.gl.glClearColor(0.8f, 0.8f, 0, 1); //Gelb
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}else if ((random == 2)){
Gdx.gl.glClearColor(1, 0.5f, 0.25f, 1); //Orange
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}else if (random == 3){
Gdx.gl.glClearColor(0.25f, 0.5f, 1, 1); //Blau
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}else if (random == 4){
Gdx.gl.glClearColor(0, 0.8f, 0.3f, 1); //Grün
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}else if (random == 5){
Gdx.gl.glClearColor(1, 1, 1, 1); //Weiß
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}
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.end();
loadTime += delta;
if (loadTime > 0.5)
if (loadTime > 1.9)
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
}