diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/GameCtrl.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/GameState.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateDirection.java | 46 |
3 files changed, 0 insertions, 53 deletions
diff --git a/core/src/ch/asynk/tankontank/game/GameCtrl.java b/core/src/ch/asynk/tankontank/game/GameCtrl.java index 4d4c4f4..bcec97f 100644 --- a/core/src/ch/asynk/tankontank/game/GameCtrl.java +++ b/core/src/ch/asynk/tankontank/game/GameCtrl.java @@ -6,7 +6,6 @@ import ch.asynk.tankontank.TankOnTank; import ch.asynk.tankontank.game.states.GameStateCommon; import ch.asynk.tankontank.game.states.GameStateSelect; import ch.asynk.tankontank.game.states.GameStateMove; -import ch.asynk.tankontank.game.states.GameStateDirection; import ch.asynk.tankontank.game.states.GameStateRotate; import ch.asynk.tankontank.game.states.GameStateAnimation; @@ -40,7 +39,6 @@ public class GameCtrl implements Disposable private GameState selectState; private GameState pathState; - private GameState directionState; private GameState rotateState; private GameState animationState; @@ -60,7 +58,6 @@ public class GameCtrl implements Disposable this.selectState = new GameStateSelect(this, map); this.pathState = new GameStateMove(); - this.directionState = new GameStateDirection(); this.rotateState = new GameStateRotate(); this.animationState = new GameStateAnimation(); @@ -118,9 +115,6 @@ public class GameCtrl implements Disposable case MOVE: this.state = pathState; break; - case DIRECTION: - this.state = directionState; - break; case ROTATE: this.state = rotateState; break; diff --git a/core/src/ch/asynk/tankontank/game/GameState.java b/core/src/ch/asynk/tankontank/game/GameState.java index 70568bd..428446d 100644 --- a/core/src/ch/asynk/tankontank/game/GameState.java +++ b/core/src/ch/asynk/tankontank/game/GameState.java @@ -5,7 +5,6 @@ public interface GameState enum State { SELECT, MOVE, - DIRECTION, ROTATE, ANIMATION }; diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java b/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java deleted file mode 100644 index f1b2bb5..0000000 --- a/core/src/ch/asynk/tankontank/game/states/GameStateDirection.java +++ /dev/null @@ -1,46 +0,0 @@ -package ch.asynk.tankontank.game.states; - -import ch.asynk.tankontank.engine.Orientation; - -public class GameStateDirection extends GameStateCommon -{ - @Override - public void enter(boolean reset) - { - map.showFinalPath(to, true); - } - - @Override - public void leave() - { - map.showMoveAssists(false); - map.showFinalPath(to, false); - if (to.x != -1) unselectHex(to); - if (from.x != -1) unselectHex(from); - to.set(-1, -1); - from.set(-1, -1); - } - - @Override - public void touchDown() - { - } - - @Override - public void touchUp() - { - Orientation o = Orientation.fromAdj(to.x, to.y, downHex.x, downHex.y); - - if (o != Orientation.KEEP) { - map.movePawn(pawn, o); - ctrl.hud.hide(); - ctrl.setState(State.ANIMATION); - } - } - - @Override - public void abort() - { - super.abort(); - } -} |