bei Tot wieder zurück ins Menü
This commit is contained in:
parent
856f6e92e7
commit
2253d55fd2
|
@ -88,7 +88,7 @@ public abstract class AbstractGameRenderer {
|
||||||
}
|
}
|
||||||
protected void beginHud(){
|
protected void beginHud(){
|
||||||
fontBatch.begin();
|
fontBatch.begin();
|
||||||
font.setColor(1, 0, 1, 1);
|
font.setColor(0, 1, 1, 1);
|
||||||
|
|
||||||
hudTextCount = 0;
|
hudTextCount = 0;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public abstract class AbstractGameRenderer {
|
||||||
}
|
}
|
||||||
protected void renderHud(String s){
|
protected void renderHud(String s){
|
||||||
Vector3 coords = cam.unproject(new Vector3(10, 10, 0));
|
Vector3 coords = cam.unproject(new Vector3(10, 10, 0));
|
||||||
font.draw(fontBatch, s, coords.x + hudTextCount++ * 20, coords.y);
|
font.draw(fontBatch, s, coords.x+ 75 + hudTextCount++ * 40, coords.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void endDebug() {
|
protected void endDebug() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class CRGameRenderer extends AbstractGameRenderer {
|
||||||
gameworld.camViewBoundaries = getCamViewRectangle();
|
gameworld.camViewBoundaries = getCamViewRectangle();
|
||||||
|
|
||||||
renderMain();
|
renderMain();
|
||||||
|
renderHud();
|
||||||
|
|
||||||
if (CRGame.DEBUG) renderDebugBoxes();
|
if (CRGame.DEBUG) renderDebugBoxes();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package de.samdev.colorrunner.game.world;
|
package de.samdev.colorrunner.game.world;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Game;
|
||||||
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -9,6 +11,7 @@ import de.samdev.colorrunner.game.world.entities.CRGameEntity;
|
||||||
import de.samdev.colorrunner.game.world.entities.gameentities.PlayerEntity;
|
import de.samdev.colorrunner.game.world.entities.gameentities.PlayerEntity;
|
||||||
import de.samdev.colorrunner.game.world.map.provider.MapProvider;
|
import de.samdev.colorrunner.game.world.map.provider.MapProvider;
|
||||||
import de.samdev.colorrunner.input.GameInputListener;
|
import de.samdev.colorrunner.input.GameInputListener;
|
||||||
|
import de.samdev.colorrunner.screens.menu.MainMenu;
|
||||||
|
|
||||||
public class CRGameWorld implements GameInputListener {
|
public class CRGameWorld implements GameInputListener {
|
||||||
public PlayerEntity player;
|
public PlayerEntity player;
|
||||||
|
@ -47,7 +50,7 @@ public class CRGameWorld implements GameInputListener {
|
||||||
|
|
||||||
if(player.getPosition().y < - 10)
|
if(player.getPosition().y < - 10)
|
||||||
{
|
{
|
||||||
//((Game) Gdx.app.getApplicationListener()).setScreen(new GameScreen());
|
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
mapprovider.update(this, player.bounds);
|
mapprovider.update(this, player.bounds);
|
||||||
|
|
Loading…
Reference in New Issue