summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java8
-rw-r--r--core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index ff33e7f..4d73c17 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -35,7 +35,8 @@ public abstract class Ctrl implements Disposable
STATE_CHANGE,
HUD_ANSWER,
ANIMATIONS_DONE,
- UNIT_DOCK_TOGGLE;
+ UNIT_DOCK_TOGGLE,
+ UNIT_DOCK_SELECT;
}
class Event
@@ -226,6 +227,9 @@ public abstract class Ctrl implements Disposable
case UNIT_DOCK_TOGGLE:
unitDockToggle();
break;
+ case UNIT_DOCK_SELECT:
+ unitDockSelect((Unit) evt.data);
+ break;
default:
RustAndDust.error(String.format("Unhandled Event Type : %s %s", evt.type, evt.data));
}
@@ -327,7 +331,7 @@ public abstract class Ctrl implements Disposable
}
}
- public void showEntryZone()
+ private void unitDockSelect(Unit unit)
{
if ((stateType == StateType.DEPLOYMENT) || (stateType == StateType.REINFORCEMENT))
state.touch(null);
diff --git a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java
index 9701cf3..e96856f 100644
--- a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java
+++ b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java
@@ -146,7 +146,7 @@ public class PlayerInfo implements Disposable, Drawable, Animation
}
else if (unitDock.hit(x, y)) {
ctrl.hud.notify(unitDock.selectedUnit.toString(), Position.TOP_CENTER);
- ctrl.showEntryZone();
+ ctrl.postEvent(Ctrl.EventType.UNIT_DOCK_SELECT, unitDock.selectedUnit);
return true;
}