mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
endre til et annet screen
This commit is contained in:
parent
0ddf309e70
commit
cafde5245d
@ -47,13 +47,17 @@ public class LoadingScreen extends AbstractScreen {
|
|||||||
roboRallyWrapper.batch.end();
|
roboRallyWrapper.batch.end();
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
//TODO: Allow to set any condition and next screen
|
//TODO: Allow to set any condition and next screen
|
||||||
if (roboRallyWrapper.roboRallyGame.getGameState() != initialGameState) {
|
if (roboRallyWrapper.roboRallyGame != null && roboRallyWrapper.roboRallyGame.getGameState() != initialGameState ) {
|
||||||
handleScreenChange();
|
handleScreenChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleScreenChange() {
|
private void handleScreenChange() {
|
||||||
|
switch (initialGameState) {
|
||||||
|
case SENDING_CARDS:
|
||||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper));
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -64,7 +68,12 @@ public class LoadingScreen extends AbstractScreen {
|
|||||||
@Override
|
@Override
|
||||||
public void show() {
|
public void show() {
|
||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
|
if (roboRallyWrapper.roboRallyGame == null){
|
||||||
|
initialGameState = GameState.INITIAL_SETUP;
|
||||||
|
}
|
||||||
|
else {
|
||||||
initialGameState = roboRallyWrapper.roboRallyGame.getGameState();
|
initialGameState = roboRallyWrapper.roboRallyGame.getGameState();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user