diff options
-rw-r--r-- | src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java index 9c8e9d7..7c4de27 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java | |||
@@ -208,12 +208,24 @@ public class MapViewGameState implements GameState { | |||
208 | 208 | ||
209 | BufferedImage eventLayer = new BufferedImage(currentMap.getSize().width*16, currentMap.getSize().height*16, BufferedImage.TYPE_INT_ARGB); | 209 | BufferedImage eventLayer = new BufferedImage(currentMap.getSize().width*16, currentMap.getSize().height*16, BufferedImage.TYPE_INT_ARGB); |
210 | Graphics2D g2 = eventLayer.createGraphics(); | 210 | Graphics2D g2 = eventLayer.createGraphics(); |
211 | EventList events = currentMap.getEvents(); | ||
212 | |||
213 | for (LayerEvent event : events) | ||
214 | { | ||
215 | if (event.getLayer() != Layer.Above) | ||
216 | { | ||
217 | event.render(g2); | ||
218 | } | ||
219 | } | ||
220 | |||
211 | Game.getHeroEvent().render(g2); | 221 | Game.getHeroEvent().render(g2); |
212 | 222 | ||
213 | EventList events = currentMap.getEvents(); | ||
214 | for (LayerEvent event : events) | 223 | for (LayerEvent event : events) |
215 | { | 224 | { |
216 | event.render(g2); | 225 | if (event.getLayer() == Layer.Above) |
226 | { | ||
227 | event.render(g2); | ||
228 | } | ||
217 | } | 229 | } |
218 | 230 | ||
219 | g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); | 231 | g.drawImage(eventLayer, 0, 0, Game.WIDTH, Game.HEIGHT, x, y, x+Game.WIDTH, y+Game.HEIGHT, null); |