Merge branch 'develop' of https://github.com/ProjectGroepA2/Arcade into develop
Conflicts: image/Images.java
This commit is contained in:
+3
-2
@@ -32,7 +32,7 @@ public class Images {
|
||||
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/aanwijzers4sho.png"))));
|
||||
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/kast.png"))));
|
||||
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/gameover.png"))));
|
||||
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/gameover.png"))));
|
||||
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/help.png"))));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -100,7 +100,8 @@ public class Images {
|
||||
public static VolatileImage initVolatileImage(int width, int height, int opc){
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration();
|
||||
VolatileImage image = gc.createCompatibleVolatileImage(width, height, opc);
|
||||
VolatileImage image = null;
|
||||
image = gc.createCompatibleVolatileImage(width, height, opc);
|
||||
int valid = image.validate(gc);
|
||||
if (valid == VolatileImage.IMAGE_INCOMPATIBLE)
|
||||
image = initVolatileImage(width, height, opc);
|
||||
|
||||
@@ -49,6 +49,13 @@ public class GameOverState extends GameState {
|
||||
createBackground();
|
||||
ButtonHandler.getButton(1).setColor(GameModel.colors[0]);
|
||||
ButtonHandler.getButton(2).setColor(GameModel.colors[2]);
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
JoystickHandler.REPEAT = true;
|
||||
uploaded = false;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import control.GameStateManager.State;
|
||||
import control.button.ButtonEvent;
|
||||
import control.button.ButtonHandler;
|
||||
import control.joystick.Joystick;
|
||||
import control.joystick.Joystick.Position;
|
||||
import control.joystick.JoystickEvent;
|
||||
import control.joystick.JoystickHandler;
|
||||
import data.io.SQLConnector;
|
||||
|
||||
@@ -158,7 +158,7 @@ public class PlayState extends GameState {
|
||||
}
|
||||
|
||||
private void endGame() {
|
||||
if(sh.getProgress()/1000 < 5000)
|
||||
if(sh.getProgress()/1000 > 5000)
|
||||
{
|
||||
sql.addPlaydata(sh.getCurrentSong(), sh.getCurrentSongInstance(), sh.getProgress()/1000, enemies_missed, enemies_hit, buttons_pressed, joystick_moved);
|
||||
sh.getCurrentSongInstance().played();
|
||||
|
||||
Reference in New Issue
Block a user