mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-07 18:49:34 +01:00
endre neste screen etter du trykker på powerdown knappen
This commit is contained in:
parent
1ded5fa8b2
commit
d8c6a8e04c
@ -20,6 +20,7 @@ public class PowerDownScreen implements Screen {
|
||||
private long startTime;
|
||||
private final int applicationWidth = 600;
|
||||
private final int applicationHeight = 800;
|
||||
private Boolean press = false;
|
||||
public PowerDownScreen(final RoboRallyWrapper roboRallyWrapper) {
|
||||
camera = new OrthographicCamera();
|
||||
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
|
||||
@ -35,7 +36,8 @@ public class PowerDownScreen implements Screen {
|
||||
powerDownButton.addListener(new InputListener() {
|
||||
@Override
|
||||
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
||||
return true;
|
||||
press = true;
|
||||
return true;//her we do stuff
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -63,6 +65,10 @@ public class PowerDownScreen implements Screen {
|
||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getMainMenuScreen(this.roboRallyWrapper));
|
||||
dispose();
|
||||
}
|
||||
else if (press){
|
||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper));
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user