Legger til manglende kommentarer for klasse og konstruktør

This commit is contained in:
Kristian Knarvik 2020-04-07 15:14:32 +02:00
parent 0c8b9f47d9
commit 9bda321c6f

View File

@ -7,6 +7,9 @@ import com.badlogic.gdx.utils.viewport.ExtendViewport;
import com.badlogic.gdx.utils.viewport.Viewport; import com.badlogic.gdx.utils.viewport.Viewport;
import inf112.fiasko.roborally.game_wrapper.RoboRallyWrapper; import inf112.fiasko.roborally.game_wrapper.RoboRallyWrapper;
/**
* This screen is used to wait for something
*/
public class LoadingScreen extends AbstractScreen { public class LoadingScreen extends AbstractScreen {
private final RoboRallyWrapper roboRallyWrapper; private final RoboRallyWrapper roboRallyWrapper;
@ -15,6 +18,10 @@ public class LoadingScreen extends AbstractScreen {
private long startTime; private long startTime;
/**
* Instantiates a new loading screen
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
*/
public LoadingScreen(final RoboRallyWrapper roboRallyWrapper) { public LoadingScreen(final RoboRallyWrapper roboRallyWrapper) {
this.roboRallyWrapper = roboRallyWrapper; this.roboRallyWrapper = roboRallyWrapper;
camera = new OrthographicCamera(); camera = new OrthographicCamera();
@ -36,6 +43,7 @@ public class LoadingScreen extends AbstractScreen {
applicationHeight / 2f,380, 1, true); applicationHeight / 2f,380, 1, true);
roboRallyWrapper.batch.end(); roboRallyWrapper.batch.end();
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
//TODO: Allow to set any condition and next screen
if (time - startTime > 5000){ if (time - startTime > 5000){
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper)); roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getBoardActiveScreen(this.roboRallyWrapper));
} }