mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-08 02:59:36 +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 long startTime;
|
||||||
private final int applicationWidth = 600;
|
private final int applicationWidth = 600;
|
||||||
private final int applicationHeight = 800;
|
private final int applicationHeight = 800;
|
||||||
|
private Boolean press = false;
|
||||||
public PowerDownScreen(final RoboRallyWrapper roboRallyWrapper) {
|
public PowerDownScreen(final RoboRallyWrapper roboRallyWrapper) {
|
||||||
camera = new OrthographicCamera();
|
camera = new OrthographicCamera();
|
||||||
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
|
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
|
||||||
@ -35,7 +36,8 @@ public class PowerDownScreen implements Screen {
|
|||||||
powerDownButton.addListener(new InputListener() {
|
powerDownButton.addListener(new InputListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
|
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));
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getMainMenuScreen(this.roboRallyWrapper));
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
else if (press){
|
||||||
|
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper));
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user