From 6a9742d7c8b89c8eebb91cad62395db0fc1dc0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 31 Mar 2016 20:07:59 +0200 Subject: Ctrl: postAnimationsDone() -> postEvent(EventType) --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 4 ++-- core/src/ch/asynk/rustanddust/game/map/Map3Animations.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index d9fb0eb..53945c7 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -193,10 +193,10 @@ public abstract class Ctrl implements Disposable events.enqueue(evt); } - public void postAnimationsDone() + public void postEvent(EventType type) { Event evt = getEvent(); - evt.type = EventType.ANIMATIONS_DONE; + evt.type = type; events.enqueue(evt); } diff --git a/core/src/ch/asynk/rustanddust/game/map/Map3Animations.java b/core/src/ch/asynk/rustanddust/game/map/Map3Animations.java index d6614f1..eba741b 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map3Animations.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map3Animations.java @@ -21,6 +21,7 @@ import ch.asynk.rustanddust.game.Hex; import ch.asynk.rustanddust.game.Unit; import ch.asynk.rustanddust.game.Army; import ch.asynk.rustanddust.game.Player; +import ch.asynk.rustanddust.game.Ctrl.EventType; public abstract class Map3Animations extends Map2Moves implements MoveToAnimationCb { @@ -141,6 +142,6 @@ public abstract class Map3Animations extends Map2Moves implements MoveToAnimatio addAnimation( SoundAnimation.get(SoundAnimation.Action.FADE_OUT, sound, soundId, game.config.fxVolume, 0.5f)); soundId = -1; } else - game.ctrl.postAnimationsDone(); + game.ctrl.postEvent(EventType.ANIMATIONS_DONE); } } -- cgit v1.1-2-g2b99