diff options
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java index c3bec32..1a33158 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | |||
@@ -282,18 +282,26 @@ public class SpecialEvent { | |||
282 | mapView.setViewpoint(new MovingViewpoint(viewpoint.getX(), viewpoint.getY(), x*16, y*16, new Runnable() { | 282 | mapView.setViewpoint(new MovingViewpoint(viewpoint.getX(), viewpoint.getY(), x*16, y*16, new Runnable() { |
283 | public void run() | 283 | public void run() |
284 | { | 284 | { |
285 | mapView.setViewpoint(new FixedViewpoint(x*16,y*16)); | ||
286 | |||
287 | if (block) | 285 | if (block) |
288 | { | 286 | { |
289 | blocker.countDown(); | 287 | blocker.countDown(); |
288 | } else { | ||
289 | mapView.setViewpoint(new FixedViewpoint(x*16,y*16)); | ||
290 | } | 290 | } |
291 | } | 291 | } |
292 | }, length)); | 292 | }, length)); |
293 | 293 | ||
294 | if (block) | 294 | if (block) |
295 | { | 295 | { |
296 | blocker.await(); | 296 | try |
297 | { | ||
298 | blocker.await(); | ||
299 | } catch (InterruptedException ex) | ||
300 | { | ||
301 | throw ex; | ||
302 | } finally { | ||
303 | mapView.setViewpoint(new FixedViewpoint(x*16,y*16)); | ||
304 | } | ||
297 | } | 305 | } |
298 | } | 306 | } |
299 | 307 | ||
@@ -334,4 +342,14 @@ public class SpecialEvent { | |||
334 | Audio.stopMusic(); | 342 | Audio.stopMusic(); |
335 | } | 343 | } |
336 | 344 | ||
345 | /** | ||
346 | * Ends the currently executing event thread | ||
347 | * | ||
348 | * @throws InterruptedException | ||
349 | */ | ||
350 | public void StopThread() throws InterruptedException | ||
351 | { | ||
352 | throw new InterruptedException(); | ||
353 | } | ||
354 | |||
337 | } | 355 | } |