diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 12:38:08 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 12:38:08 -0500 |
commit | 1db6402b9171fc13b377b01d49531659a4e1fc76 (patch) | |
tree | 7bbf06df73b0b0f5c232ead87ba72c6cd3405799 /src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | |
parent | 6b188d5f1415c69cc62fcbd853802f279fcd690d (diff) | |
download | fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.tar.gz fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.tar.bz2 fourpuzzle-1db6402b9171fc13b377b01d49531659a4e1fc76.zip |
Engine: Abstracted action key
Because some people prefer to use the space bar as the action key rather than the enter key, KeyInput now has a method that checks if either is down. Action key requiring conditions use this now instead of manually checking the key.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java b/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java index d9b9ea1..e87f80a 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java | |||
@@ -15,7 +15,6 @@ import com.fourisland.fourpuzzle.database.Music; | |||
15 | import com.fourisland.fourpuzzle.database.Transitions; | 15 | import com.fourisland.fourpuzzle.database.Transitions; |
16 | import com.fourisland.fourpuzzle.util.ObjectLoader; | 16 | import com.fourisland.fourpuzzle.util.ObjectLoader; |
17 | import java.awt.Graphics2D; | 17 | import java.awt.Graphics2D; |
18 | import java.awt.event.KeyEvent; | ||
19 | 18 | ||
20 | /** | 19 | /** |
21 | * | 20 | * |
@@ -35,7 +34,7 @@ public class GameOverGameState implements GameState { | |||
35 | 34 | ||
36 | public void processInput(KeyInput key) | 35 | public void processInput(KeyInput key) |
37 | { | 36 | { |
38 | if ((key.getKey() == KeyEvent.VK_ENTER) || (key.getKey() == KeyEvent.VK_SPACE)) | 37 | if (key.isActionDown()) |
39 | { | 38 | { |
40 | Game.setSaveFile(new SaveFile()); | 39 | Game.setSaveFile(new SaveFile()); |
41 | 40 | ||