mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
la til flere cases og endret hvilket screens som blir vist
This commit is contained in:
parent
198a21a5a4
commit
c552ef028b
@ -43,19 +43,26 @@ public class LoadingScreen extends AbstractScreen {
|
|||||||
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Loading...", applicationWidth/2f-380/2f,
|
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Loading...", applicationWidth/2f-380/2f,
|
||||||
applicationHeight / 2f,380, 1, true);
|
applicationHeight / 2f,380, 1, true);
|
||||||
roboRallyWrapper.batch.end();
|
roboRallyWrapper.batch.end();
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
//TODO: Allow to set any condition and next screen
|
//if (roboRallyWrapper.roboRallyGame != null){
|
||||||
if (roboRallyWrapper.roboRallyGame != null && roboRallyWrapper.roboRallyGame.getGameState() != initialGameState) {
|
// System.out.println(roboRallyWrapper.roboRallyGame.getGameState());
|
||||||
|
//}
|
||||||
|
if (roboRallyWrapper.roboRallyGame != null && roboRallyWrapper.roboRallyGame.getGameState() != GameState.LOADING) {
|
||||||
handleScreenChange();
|
handleScreenChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleScreenChange() {
|
private void handleScreenChange() {
|
||||||
switch (initialGameState) {
|
switch (roboRallyWrapper.roboRallyGame.getGameState()) {
|
||||||
case SENDING_CARDS:
|
case RUNNING_PROGRAMS:
|
||||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper));
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper));
|
||||||
break;
|
break;
|
||||||
}
|
case INITIAL_SETUP:
|
||||||
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper));
|
||||||
|
break;
|
||||||
|
case CHOOSING_CARDS:
|
||||||
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getCardChoiceScreen(this.roboRallyWrapper));
|
||||||
|
break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user