summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game/states
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-08 09:50:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-08 09:50:13 +0200
commitdfbb46520fac0feb9d1126883be8f8525732bc3e (patch)
tree9f279c87238e19ee15d404a9fdcad17ed41e8893 /core/src/ch/asynk/tankontank/game/states
parenta577a611d27bc7ffe7df254ba3bfecc37794af1c (diff)
downloadRustAndDust-dfbb46520fac0feb9d1126883be8f8525732bc3e.zip
RustAndDust-dfbb46520fac0feb9d1126883be8f8525732bc3e.tar.gz
GameStateDirection, GameStateSelect: use GameCtrl.Config
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateDirection.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateSelect.java12
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();
}