summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-02-15 10:45:26 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-02-15 10:45:26 -0500
commitffba4e065710ce5d76872607d9bc4676feae6c28 (patch)
tree7c23655ba8c4b0fb15714ccca94fd7c593cc4858 /src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java
parente50f6fe85fd19d2f91a3877ac99eca234537aac2 (diff)
downloadfourpuzzle-ffba4e065710ce5d76872607d9bc4676feae6c28.tar.gz
fourpuzzle-ffba4e065710ce5d76872607d9bc4676feae6c28.tar.bz2
fourpuzzle-ffba4e065710ce5d76872607d9bc4676feae6c28.zip
Engine: Created Fade transitions
Along with Fade Transitions, other things such as the GameOver and TitleScreen special events have been implemented. Also, an unchecked bug in ObjectLoader has been fixed.

The current Fade implementation isn't currently that elegant. There should be a way to make it better, but it'll do for now.

Closes #13
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java index 94d2b16..9336616 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java
@@ -8,6 +8,8 @@ package com.fourisland.fourpuzzle.gamestate.mapview.event;
8import com.fourisland.fourpuzzle.database.Database; 8import com.fourisland.fourpuzzle.database.Database;
9import com.fourisland.fourpuzzle.*; 9import com.fourisland.fourpuzzle.*;
10import com.fourisland.fourpuzzle.database.Transitions; 10import com.fourisland.fourpuzzle.database.Transitions;
11import com.fourisland.fourpuzzle.gamestate.GameOverGameState;
12import com.fourisland.fourpuzzle.gamestate.TitleScreenGameState;
11import com.fourisland.fourpuzzle.gamestate.mapview.MapViewGameState; 13import com.fourisland.fourpuzzle.gamestate.mapview.MapViewGameState;
12import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEvent; 14import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEvent;
13import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEventThread; 15import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEventThread;
@@ -148,18 +150,32 @@ public class SpecialEvent {
148 150
149 /** 151 /**
150 * Triggers the Game Over sequence 152 * Triggers the Game Over sequence
153 *
154 * @throws InterruptedException
151 */ 155 */
152 public void GameOver() 156 public void GameOver() throws InterruptedException
153 { 157 {
154 throw new UnsupportedOperationException("Not yet implemented"); 158 Display.transition(Database.getTransition(Transitions.MapToGameOver));
159
160 Audio.stopMusic();
161 Game.setGameState(new GameOverGameState());
162
163 Display.transition(Database.getTransition(Transitions.GameOverEnter));
155 } 164 }
156 165
157 /** 166 /**
158 * Returns the player to the Title Screen 167 * Returns the player to the Title Screen
168 *
169 * @throws InterruptedException
159 */ 170 */
160 public void TitleScreen() 171 public void TitleScreen() throws InterruptedException
161 { 172 {
162 throw new UnsupportedOperationException("Not yet implemented"); 173 Display.transition(Database.getTransition(Transitions.MapToTitle));
174
175 Audio.stopMusic();
176 Game.setGameState(new TitleScreenGameState());
177
178 Display.transition(Database.getTransition(Transitions.TitleEnter));
163 } 179 }
164 180
165 private boolean startedTransition = false; 181 private boolean startedTransition = false;