diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 11 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/State.java | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 871dba6..96dffa9 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -84,8 +84,7 @@ public abstract class Ctrl implements Disposable this.deploymentState = new StateDeployment(); this.withdrawState = new StateWithdraw(); - this.state = selectState; - this.stateType = StateType.DONE; + this.stateType = StateType.LOADING; battle.init(); this.map = battle.getMap(); @@ -94,6 +93,9 @@ public abstract class Ctrl implements Disposable hud.update(); this.hud.notify(battle.toString(), 2, Position.MIDDLE_CENTER, false); + this.state = selectState; + this.stateType = StateType.DONE; + setState(battle.getState()); } @@ -105,6 +107,11 @@ public abstract class Ctrl implements Disposable battle.desinit(); } + public boolean isLoading() + { + return (stateType == StateType.LOADING); + } + // INPUTS public boolean drag(float x, float y, int dx, int dy) diff --git a/core/src/ch/asynk/rustanddust/game/State.java b/core/src/ch/asynk/rustanddust/game/State.java index 73a0f5b..114c680 100644 --- a/core/src/ch/asynk/rustanddust/game/State.java +++ b/core/src/ch/asynk/rustanddust/game/State.java @@ -3,6 +3,7 @@ package ch.asynk.rustanddust.game; public interface State { enum StateType { + LOADING, SELECT, MOVE, ROTATE, |