diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-22 20:06:25 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-22 20:06:25 +0100 |
commit | 70454c52445b797efc2384b92d6992aea3779ea1 (patch) | |
tree | 41cc51085db21764d27ddbb53d6d1749005d89b0 | |
parent | b4008960993debf83d0a16b897fc7974c6c9aba1 (diff) | |
download | RustAndDust-70454c52445b797efc2384b92d6992aea3779ea1.zip RustAndDust-70454c52445b797efc2384b92d6992aea3779ea1.tar.gz |
StateEngage: hit target to launch attack
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateEngage.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateEngage.java b/core/src/ch/asynk/tankontank/game/states/StateEngage.java index 14465cc..fb83080 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateEngage.java +++ b/core/src/ch/asynk/tankontank/game/states/StateEngage.java @@ -93,8 +93,10 @@ public class StateEngage extends StateCommon map.showAttackAssists(); ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0)); } - - if ((activeUnit != null) && map.engagementAssists.contains(unit)) { + else if (unit == activeUnit) { + ctrl.setState(StateType.DONE); + } + else if ((activeUnit != null) && map.engagementAssists.contains(unit)) { if(map.toggleAttackAssist(unit)) ctrl.hud.notify(unit + " will fire"); else |