diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-03 21:11:23 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-03 21:11:23 -0500 |
commit | 029190712a8f38cef760741cf53652e0ccd89172 (patch) | |
tree | bf1a01b9103592f4dda7511e9b23913bbbd98870 /src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | |
parent | ce6ae1b56e4f6548dc19974474c8ee2d8cece13a (diff) | |
download | fourpuzzle-029190712a8f38cef760741cf53652e0ccd89172.tar.gz fourpuzzle-029190712a8f38cef760741cf53652e0ccd89172.tar.bz2 fourpuzzle-029190712a8f38cef760741cf53652e0ccd89172.zip |
Started working on new Transitions
The old transition implementation was old and patchy. The new one is planned to be extensible and to work properly with all transitions. Currently this is not so, but with work it hopefully will be.
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 | ||