diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-24 00:30:46 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-24 00:30:46 +0100 |
commit | ec35f7a40100a82154c3b041e5a2522fc74380d4 (patch) | |
tree | 2137a9d529678293391baf95795b8b68cb74e03a /core/src/ch/asynk/rustanddust/game | |
parent | 6ea6d191d0cad59845efb41764310230786621f3 (diff) | |
download | RustAndDust-ec35f7a40100a82154c3b041e5a2522fc74380d4.zip RustAndDust-ec35f7a40100a82154c3b041e5a2522fc74380d4.tar.gz |
State leave/enter -> leaveFor/enterFrom
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
12 files changed, 24 insertions, 24 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 4836b19..2885b5f 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -262,14 +262,14 @@ public abstract class Ctrl implements Disposable hud.playerInfo.blockEndOfTurn(nextState != StateType.SELECT); - this.state.leave(nextState); + this.state.leaveFor(nextState); this.state = getNextState(nextState); StateType tmp = stateType; stateType = nextState; - this.state.enter(tmp); + this.state.enterFrom(tmp); if (nextState == StateType.TURN_OVER) turnDone(); diff --git a/core/src/ch/asynk/rustanddust/game/State.java b/core/src/ch/asynk/rustanddust/game/State.java index 114c680..d3fbb1b 100644 --- a/core/src/ch/asynk/rustanddust/game/State.java +++ b/core/src/ch/asynk/rustanddust/game/State.java @@ -19,9 +19,9 @@ public interface State TURN_OVER }; - public void enter(StateType prevState); + public void enterFrom(StateType prevState); - public void leave(StateType nextState); + public void leaveFor(StateType nextState); public StateType abort(); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateAnimation.java b/core/src/ch/asynk/rustanddust/game/states/StateAnimation.java index 4b50bec..c19f16b 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateAnimation.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateAnimation.java @@ -3,13 +3,13 @@ package ch.asynk.rustanddust.game.states; public class StateAnimation extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { ctrl.hud.actionButtons.hide(); } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java index 317051d..749265b 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java @@ -10,7 +10,7 @@ public class StateBreak extends StateCommon private Orientation o = Orientation.KEEP; @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { activeUnit = null; ctrl.hud.actionButtons.show(Buttons.DONE.b); @@ -19,7 +19,7 @@ public class StateBreak extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { map.unitsActivableHide(); map.hexMoveHide(to); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java index 97acf9e..34bb53d 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java @@ -13,7 +13,7 @@ public class StateDeployment extends StateCommon private UnitList deployedUnits = new UnitList(10); @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { if (selectedHex != null) map.hexUnselect(selectedHex); @@ -25,7 +25,7 @@ public class StateDeployment extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { selectedUnit = null; if (selectedHex != null) diff --git a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java index c45acb6..babe757 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java @@ -7,7 +7,7 @@ import ch.asynk.rustanddust.RustAndDust; public class StateEngage extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { map.unitsTargetClear(); @@ -29,7 +29,7 @@ public class StateEngage extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { selectedUnit.hideAttack(); map.unitsAssistHide(); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateMove.java b/core/src/ch/asynk/rustanddust/game/states/StateMove.java index 5e11f85..2a3c8b8 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateMove.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateMove.java @@ -8,7 +8,7 @@ import ch.asynk.rustanddust.game.hud.ActionButtons.Buttons; public class StateMove extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { ctrl.hud.actionButtons.show( ((map.unitsActivatedSize() > 0) ? Buttons.DONE.b : 0) @@ -44,7 +44,7 @@ public class StateMove extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { if (nextState == StateType.WITHDRAW) return; diff --git a/core/src/ch/asynk/rustanddust/game/states/StatePromote.java b/core/src/ch/asynk/rustanddust/game/states/StatePromote.java index b991949..bd249d1 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StatePromote.java +++ b/core/src/ch/asynk/rustanddust/game/states/StatePromote.java @@ -3,7 +3,7 @@ package ch.asynk.rustanddust.game.states; public class StatePromote extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { ctrl.setAfterAnimationState(StateType.DONE); ctrl.setState(StateType.ANIMATION); @@ -11,7 +11,7 @@ public class StatePromote extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { map.hexUnselect(selectedHex); } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java index bb975df..c0b3d4c 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java @@ -9,7 +9,7 @@ public class StateReinforcement extends StateCommon private Zone entryZone; @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { map.clearAll(); if (selectedHex != null) @@ -20,7 +20,7 @@ public class StateReinforcement extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { if (selectedHex != null) map.hexUnselect(selectedHex); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java index 7408472..acd2539 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java @@ -10,7 +10,7 @@ public class StateRotate extends StateCommon private boolean rotationSet; @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { if (!cfg.showMoveAssists) map.unitsActivableHide(); @@ -38,7 +38,7 @@ public class StateRotate extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { map.hexUnselect(activeUnit.getHex()); map.pathHide(to); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java index d6fb021..a3c563a 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java @@ -9,7 +9,7 @@ import ch.asynk.rustanddust.RustAndDust; public class StateSelect extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { to = null; selectedHex = null; @@ -20,7 +20,7 @@ public class StateSelect extends StateCommon } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { hidePossibilities(); } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java b/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java index 921eecc..ad67a83 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateWithdraw.java @@ -7,13 +7,13 @@ import ch.asynk.rustanddust.RustAndDust; public class StateWithdraw extends StateCommon { @Override - public void enter(StateType prevState) + public void enterFrom(StateType prevState) { ctrl.hud.askExitBoard(); } @Override - public void leave(StateType nextState) + public void leaveFor(StateType nextState) { } |