summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-10 15:32:19 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-10 15:32:19 +0200
commitd62eccc5d9f72a851378c4bce96602bb6deed30d (patch)
tree3d2f529f9791f6fa559d43b6d487e195bdd8172c /core/src/ch/asynk/tankontank/game
parentc7a1e0b7d559c1d6051a22d1fc0f8690b75a6445 (diff)
downloadRustAndDust-d62eccc5d9f72a851378c4bce96602bb6deed30d.zip
RustAndDust-d62eccc5d9f72a851378c4bce96602bb6deed30d.tar.gz
get rid of GameStateDirection
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/GameCtrl.java6
-rw-r--r--core/src/ch/asynk/tankontank/game/GameState.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateDirection.java46
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();
- }
-}