diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-08 09:50:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-08 09:50:13 +0200 |
commit | dfbb46520fac0feb9d1126883be8f8525732bc3e (patch) | |
tree | 9f279c87238e19ee15d404a9fdcad17ed41e8893 | |
parent | a577a611d27bc7ffe7df254ba3bfecc37794af1c (diff) | |
download | RustAndDust-dfbb46520fac0feb9d1126883be8f8525732bc3e.zip RustAndDust-dfbb46520fac0feb9d1126883be8f8525732bc3e.tar.gz |
GameStateDirection, GameStateSelect: use GameCtrl.Config
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateDirection.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateSelect.java | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java b/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java index ce9d124..dbbe0bd 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java @@ -39,7 +39,7 @@ public class GameStateDirection extends GameStateCommon private void clear() { map.enableFinalPath(tmp, false); - map.enableMoveAssists(false); + if (ctrl.cfg.showMoveAssits) map.enableMoveAssists(false); if (to.x != -1) unselectHex(to); if (from.x != -1) unselectHex(to); to.set(-1, -1); diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java b/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java index 7ab4b76..dd94b0f 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java @@ -25,15 +25,15 @@ public class GameStateSelect extends GameStateCommon public void touchUp() { if (hasPawn()) { - map.enablePossibleMoves(false); - map.enablePossibleTargets(false); - map.enableMoveAssists(false); + if (ctrl.cfg.showMoves) map.enablePossibleMoves(false); + if (ctrl.cfg.showTargets) map.enablePossibleTargets(false); + if (ctrl.cfg.showMoveAssists) map.enableMoveAssists(false); map.buildPossibleMoves(pawn, hex); map.buildPossibleTargets(pawn, hex); map.buildMoveAssists(pawn, hex); - map.enablePossibleMoves(true); - map.enablePossibleTargets(true); - map.enableMoveAssists(true); + if (ctrl.cfg.showMoves) map.enablePossibleMoves(true); + if (ctrl.cfg.showTargets) map.enablePossibleTargets(true); + if (ctrl.cfg.showMoveAssists) map.enableMoveAssists(true); } else { clear(); } |