Punkte werden nun gezählt :)
This commit is contained in:
parent
87e95ba645
commit
30bd801355
|
@ -93,7 +93,7 @@ public class CRGameRenderer extends AbstractGameRenderer {
|
||||||
|
|
||||||
private void renderHud(){
|
private void renderHud(){
|
||||||
beginHud();
|
beginHud();
|
||||||
renderHud("Points:", 10);
|
renderHud("Points: " + gameworld.scoreMeter, 10);
|
||||||
renderHud("Time:", (Gdx.graphics.getWidth() / 2) - 10);
|
renderHud("Time:", (Gdx.graphics.getWidth() / 2) - 10);
|
||||||
if (gameworld.mapprovider instanceof EndlessMapProvider)renderDebug("Procedural Piece: \"" + ((EndlessMapProvider)gameworld.mapprovider).getCurrentSection(gameworld.player.bounds).piece_name + "\"");
|
if (gameworld.mapprovider instanceof EndlessMapProvider)renderDebug("Procedural Piece: \"" + ((EndlessMapProvider)gameworld.mapprovider).getCurrentSection(gameworld.player.bounds).piece_name + "\"");
|
||||||
endHud();
|
endHud();
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class CRGameWorld implements GameInputListener {
|
||||||
|
|
||||||
public MapProvider mapprovider;
|
public MapProvider mapprovider;
|
||||||
private Music music;
|
private Music music;
|
||||||
|
public int scoreMeter = 0;
|
||||||
|
|
||||||
|
|
||||||
public CRGameWorld(MapProvider prov) {
|
public CRGameWorld(MapProvider prov) {
|
||||||
|
@ -58,6 +59,11 @@ public class CRGameWorld implements GameInputListener {
|
||||||
entities.remove(i);
|
entities.remove(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float posi = player.getPosition().x;
|
||||||
|
if((posi / 75) >= (float)scoreMeter)
|
||||||
|
{
|
||||||
|
scoreMeter++;
|
||||||
|
}
|
||||||
if(player.getPosition().y < - 10)
|
if(player.getPosition().y < - 10)
|
||||||
{
|
{
|
||||||
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
|
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
|
||||||
|
|
Loading…
Reference in New Issue