diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-03-17 09:34:18 -0400 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-03-17 09:34:18 -0400 |
commit | 28e41757f11ea216f641b4889bd43be2b6373484 (patch) | |
tree | 4d29231ca35702afd9e5bfad17b1c170098fc9aa /src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java | |
parent | 0a5ace745f171cad0150dbed11ae8febc0e17f27 (diff) | |
download | fourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.tar.gz fourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.tar.bz2 fourpuzzle-28e41757f11ea216f641b4889bd43be2b6373484.zip |
Engine: Added ShakeScreen() special action
Also implemented F12 to return to the title screen and added a move frequency variable to events that decides how often they move.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index ec35db6..89fac99 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java | |||
@@ -25,6 +25,7 @@ import com.fourisland.fourpuzzle.gamestate.mapview.event.specialmove.MoveEventTh | |||
25 | import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint; | 25 | import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.AutomaticViewpoint; |
26 | import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint; | 26 | import com.fourisland.fourpuzzle.gamestate.mapview.viewpoint.Viewpoint; |
27 | import com.fourisland.fourpuzzle.gamestate.menu.MenuGameState; | 27 | import com.fourisland.fourpuzzle.gamestate.menu.MenuGameState; |
28 | import java.awt.Color; | ||
28 | import java.awt.Graphics2D; | 29 | import java.awt.Graphics2D; |
29 | import java.awt.event.KeyEvent; | 30 | import java.awt.event.KeyEvent; |
30 | import java.awt.image.BufferedImage; | 31 | import java.awt.image.BufferedImage; |
@@ -260,6 +261,11 @@ public class MapViewGameState implements GameState { | |||
260 | int x = currentViewpoint.getX(); | 261 | int x = currentViewpoint.getX(); |
261 | int y = currentViewpoint.getY(); | 262 | int y = currentViewpoint.getY(); |
262 | 263 | ||
264 | /* Fill the background with black so specialized viewpoints that go off | ||
265 | * the screen such as ShakingViewpoint render properly */ | ||
266 | g.setColor(Color.BLACK); | ||
267 | g.fillRect(0, 0, Game.WIDTH, Game.HEIGHT); | ||
268 | |||
263 | // Render the lower layer of the map | 269 | // Render the lower layer of the map |
264 | g.drawImage(currentMap.renderLower(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); | 270 | g.drawImage(currentMap.renderLower(), 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); |
265 | 271 | ||