diff options
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java b/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java index 48706ad..d20691f 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | |||
@@ -10,11 +10,10 @@ import com.fourisland.fourpuzzle.Display; | |||
10 | import com.fourisland.fourpuzzle.Game; | 10 | import com.fourisland.fourpuzzle.Game; |
11 | import com.fourisland.fourpuzzle.SaveFile; | 11 | import com.fourisland.fourpuzzle.SaveFile; |
12 | import com.fourisland.fourpuzzle.transition.SquareTransition; | 12 | import com.fourisland.fourpuzzle.transition.SquareTransition; |
13 | import com.fourisland.fourpuzzle.transition.TransitionDirection; | ||
13 | import com.fourisland.fourpuzzle.util.ObjectLoader; | 14 | import com.fourisland.fourpuzzle.util.ObjectLoader; |
14 | import java.awt.Graphics2D; | 15 | import java.awt.Graphics2D; |
15 | import java.awt.event.KeyEvent; | 16 | import java.awt.event.KeyEvent; |
16 | import java.util.logging.Level; | ||
17 | import java.util.logging.Logger; | ||
18 | 17 | ||
19 | /** | 18 | /** |
20 | * | 19 | * |
@@ -37,16 +36,18 @@ public class GameOverGameState implements GameState { | |||
37 | if ((Game.getKey().getKeyCode() == KeyEvent.VK_ENTER) || (Game.getKey().getKeyCode() == KeyEvent.VK_SPACE)) | 36 | if ((Game.getKey().getKeyCode() == KeyEvent.VK_ENTER) || (Game.getKey().getKeyCode() == KeyEvent.VK_SPACE)) |
38 | { | 37 | { |
39 | Game.setSaveFile(new SaveFile()); | 38 | Game.setSaveFile(new SaveFile()); |
40 | //Display.transition(SquareTransition.class, this, new TitleScreenGameState()); | 39 | |
41 | Display.transition(new SquareTransition(true), new Runnable() { | 40 | new Thread(new Runnable() { |
42 | public void run() { | 41 | public void run() { |
43 | try { | 42 | try { |
44 | Game.setGameState(new TitleScreenGameState()); | 43 | Display.transition(new SquareTransition(TransitionDirection.Out)); |
45 | } catch (Exception ex) { | 44 | } catch (InterruptedException ex) { |
46 | Logger.getLogger(GameOverGameState.class.getName()).log(Level.SEVERE, null, ex); | 45 | Thread.currentThread().interrupt(); |
47 | } | 46 | } |
47 | |||
48 | Game.setGameState(new TitleScreenGameState()); | ||
48 | } | 49 | } |
49 | }); | 50 | }).start(); |
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||