diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-09 14:16:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-09 14:16:13 +0200 |
commit | 7983c8ba5954bd2b6461e69d866b37694810c918 (patch) | |
tree | ace6875462f2ba9aba6d23d5cc292ea1df4749bc /core/src/ch/asynk/tankontank | |
parent | 8d56788cd41638bc25dda3b2be03c154f3df7fec (diff) | |
download | RustAndDust-7983c8ba5954bd2b6461e69d866b37694810c918.zip RustAndDust-7983c8ba5954bd2b6461e69d866b37694810c918.tar.gz |
GameConfig: add and use canCancel, mustValidate
Diffstat (limited to 'core/src/ch/asynk/tankontank')
3 files changed, 6 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/GameCtrl.java b/core/src/ch/asynk/tankontank/game/GameCtrl.java index 7951f80..76f79ab 100644 --- a/core/src/ch/asynk/tankontank/game/GameCtrl.java +++ b/core/src/ch/asynk/tankontank/game/GameCtrl.java @@ -18,12 +18,16 @@ public class GameCtrl implements Disposable public boolean showMoves; public boolean showTargets; public boolean showMoveAssists; + public boolean canCancel; + public boolean mustValidate; public Config() { this.showMoves = true; this.showTargets = true; this.showMoveAssists = true; + this.mustValidate = false; + this.canCancel = true; } } diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java index 110e3c6..1331adc 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java @@ -7,7 +7,7 @@ public class GameStateMove extends GameStateCommon { map.clearPossiblePaths(); buildAndShowMoves(); - ctrl.hud.show(false, true, false, true, true); + ctrl.hud.show(false, true, false, ctrl.cfg.mustValidate, ctrl.cfg.canCancel); } @Override diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java index 7a200d2..75167ad 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java @@ -8,7 +8,7 @@ public class GameStateRotate extends GameStateCommon public void enter() { map.showDirections(hex, true); - ctrl.hud.show(true, false, false, true, true); + ctrl.hud.show(true, false, false, ctrl.cfg.mustValidate, ctrl.cfg.canCancel); } @Override |