diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-28 18:33:17 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-28 18:33:17 +0100 |
commit | d8c9dc3bd7e91cfe80a921665c7364a2f6d3054b (patch) | |
tree | 93629462b4bcc9854dcc2b9dbe4e41e631477ea7 /core | |
parent | 930cdbb4735fc6a52cc7b54b658907935675c3d9 (diff) | |
download | RustAndDust-d8c9dc3bd7e91cfe80a921665c7364a2f6d3054b.zip RustAndDust-d8c9dc3bd7e91cfe80a921665c7364a2f6d3054b.tar.gz |
StateSelect: quick rotation -> move if hq
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateSelect.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 839784c..7ce6251 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -89,9 +89,14 @@ public class StateSelect extends StateCommon isEnemy = ctrl.player.isEnemy(unit); if (!isEnemy && (unit == selectedUnit)) { - // quick rotate - to = upHex; - ctrl.setState(StateType.ROTATE); + if (unit.isHq()) { + select(upHex, unit, isEnemy); + ctrl.setState(StateType.MOVE); + } else { + // quick rotate + to = upHex; + ctrl.setState(StateType.ROTATE); + } } else { select(upHex, unit, isEnemy); } |