diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-14 12:31:15 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-14 12:31:15 +0100 |
commit | d2ee66dcf9adbaaf0ce96cc8005a9e1d53e681d9 (patch) | |
tree | 9d08b307638fcf8c7b5d0a149cc31bc4dcc18ce2 | |
parent | 632d5304a38dd8598a2563b7788aa8a52880ff2d (diff) | |
download | RustAndDust-d2ee66dcf9adbaaf0ce96cc8005a9e1d53e681d9.zip RustAndDust-d2ee66dcf9adbaaf0ce96cc8005a9e1d53e681d9.tar.gz |
State ATTACK -> ENGAGE
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 10 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/State.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/ActionButtons.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateEngage.java (renamed from core/src/ch/asynk/tankontank/game/states/StateAttack.java) | 10 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateSelect.java | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 3c3b5f0..09822b4 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -9,7 +9,7 @@ import ch.asynk.tankontank.game.states.StateSelect; import ch.asynk.tankontank.game.states.StateMove; import ch.asynk.tankontank.game.states.StateRotate; import ch.asynk.tankontank.game.states.StatePromote; -import ch.asynk.tankontank.game.states.StateAttack; +import ch.asynk.tankontank.game.states.StateEngage; import ch.asynk.tankontank.game.states.StateBreak; import ch.asynk.tankontank.game.states.StateAnimation; import ch.asynk.tankontank.game.states.StateReinforcement; @@ -33,7 +33,7 @@ public class Ctrl implements Disposable private State pathState; private State rotateState; private State promoteState; - private State attackState; + private State engageState; private State breakState; private State animationState; private State reinforcementState; @@ -60,7 +60,7 @@ public class Ctrl implements Disposable this.pathState = new StateMove(); this.rotateState = new StateRotate(); this.promoteState = new StatePromote(); - this.attackState = new StateAttack(); + this.engageState = new StateEngage(); this.breakState = new StateBreak(); this.animationState = new StateAnimation(); this.reinforcementState = new StateReinforcement(); @@ -209,8 +209,8 @@ public class Ctrl implements Disposable case PROMOTE: this.state = promoteState; break; - case ATTACK: - this.state = attackState; + case ENGAGE: + this.state = engageState; break; case BREAK: this.state = breakState; diff --git a/core/src/ch/asynk/tankontank/game/State.java b/core/src/ch/asynk/tankontank/game/State.java index eeecdd7..4b96156 100644 --- a/core/src/ch/asynk/tankontank/game/State.java +++ b/core/src/ch/asynk/tankontank/game/State.java @@ -6,7 +6,7 @@ public interface State SELECT, MOVE, ROTATE, - ATTACK, + ENGAGE, BREAK, PROMOTE, ANIMATION, diff --git a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java index 0da49eb..d936996 100644 --- a/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java +++ b/core/src/ch/asynk/tankontank/game/hud/ActionButtons.java @@ -17,7 +17,7 @@ public class ActionButtons extends Bg MOVE(0, 1), ROTATE( 1, 2), PROMOTE(2, 4), - ATTACK(3, 8), + ENGAGE(3, 8), DONE(4, 16), ABORT(5, 32), LAST(6, 0); @@ -51,7 +51,7 @@ public class ActionButtons extends Bg this.buttons[Buttons.MOVE.i] = new Button(atlas, "btn-move"); this.buttons[Buttons.ROTATE.i] = new Button(atlas, "btn-rotate"); this.buttons[Buttons.PROMOTE.i] = new Button(atlas, "btn-promote"); - this.buttons[Buttons.ATTACK.i] = new Button(atlas, "btn-attack"); + this.buttons[Buttons.ENGAGE.i] = new Button(atlas, "btn-attack"); this.buttons[Buttons.DONE.i] = new Button(atlas, "btn-check"); this.buttons[Buttons.ABORT.i] = new Button(atlas, "btn-cancel"); @@ -59,7 +59,7 @@ public class ActionButtons extends Bg this.states[Buttons.MOVE.i] = StateType.MOVE; this.states[Buttons.ROTATE.i] = StateType.ROTATE; this.states[Buttons.PROMOTE.i] = StateType.PROMOTE; - this.states[Buttons.ATTACK.i] = StateType.ATTACK; + this.states[Buttons.ENGAGE.i] = StateType.ENGAGE; this.states[Buttons.DONE.i] = StateType.DONE; this.states[Buttons.ABORT.i] = StateType.ABORT; } diff --git a/core/src/ch/asynk/tankontank/game/states/StateAttack.java b/core/src/ch/asynk/tankontank/game/states/StateEngage.java index 97efd87..c157a69 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateAttack.java +++ b/core/src/ch/asynk/tankontank/game/states/StateEngage.java @@ -5,14 +5,14 @@ import ch.asynk.tankontank.game.hud.ActionButtons.Buttons; import ch.asynk.tankontank.TankOnTank; -public class StateAttack extends StateCommon +public class StateEngage extends StateCommon { @Override public void enter(StateType prevState) { map.possibleTargets.clear(); - ctrl.hud.actionButtons.show(Buttons.ATTACK.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0)); - ctrl.hud.actionButtons.setOn(Buttons.ATTACK); + ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0)); + ctrl.hud.actionButtons.setOn(Buttons.ENGAGE); // activeUnit is the target if (prevState == StateType.SELECT) { @@ -87,14 +87,14 @@ public class StateAttack extends StateCommon // activeUnit is the target if ((activeUnit == null) && map.possibleTargets.contains(unit)) { - ctrl.hud.notify("Attack " + unit); + ctrl.hud.notify("Engage " + unit); map.hidePossibleTargets(); to = upHex; activeUnit = unit; activeUnit.showTarget(); map.collectAttackAssists(selectedUnit, activeUnit, ctrl.player.unitIterator()); map.showAttackAssists(); - ctrl.hud.actionButtons.show(Buttons.ATTACK.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0)); + ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0)); } if ((activeUnit != null) && map.attackAssists.contains(unit)) { diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 82733fb..7e7059e 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -64,7 +64,7 @@ public class StateSelect extends StateCommon if (map.possibleTargets.contains(upHex.getUnit())) { // quick fire to = upHex; - ctrl.setState(StateType.ATTACK); + ctrl.setState(StateType.ENGAGE); return; } } @@ -87,7 +87,7 @@ public class StateSelect extends StateCommon ((ctrl.player.canPromote(selectedUnit)) ? Buttons.PROMOTE.b : 0 ) | ((selectedUnit.canMove()) ? Buttons.ROTATE.b : 0 ) | ((moves > 0) ? Buttons.MOVE.b : 0 ) | - ((targets > 0) ? Buttons.ATTACK.b : 0) + ((targets > 0) ? Buttons.ENGAGE.b : 0) ); } else { ctrl.hud.actionButtons.hide(); |