Skip to content
Snippets Groups Projects
Commit 00a144da authored by Turid Cecilie Dahl's avatar Turid Cecilie Dahl
Browse files

#62 changed state after score because of bug

parent 8e896491
No related branches found
No related tags found
1 merge request!59Resolve "ScoreState"
package com.gameware.game.states;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
......@@ -103,7 +104,10 @@ public class MenuState extends State{
protected void handleInput() { }
@Override
public void update(float dt) { stage.act(dt); }
public void update(float dt) {
Gdx.input.setInputProcessor(stage);
stage.act(dt);
}
@Override
public void render(SpriteBatch sb) { stage.draw(); }
......
......@@ -14,7 +14,7 @@ public abstract class PlayStateTemplate extends State {
private Round round = null;
private Tournament tournament = null;
private Round nextRound = null;
protected float totalGameTime = 30f;
protected float totalGameTime = 5f;
public PlayStateTemplate(GameStateManager gsm){
super(gsm);
......@@ -45,6 +45,8 @@ public abstract class PlayStateTemplate extends State {
if(round == null) {
gsm.set(new ScoreState(gsm, this.score, new SinglePlayerSelectGameState(gsm)));
} else{
//TODO: nextRound blir null :/
// gsm.set(new ScoreState(gsm, this.score, new ViewTournamentState(gsm, tournament, nextRound)));
gsm.set(new ScoreState(gsm, this.score, new CreateJoinTournamentState(gsm)));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment