From 7c632e6e19c32fb8eff0464b5d5ea1a775c26358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 15 Nov 2014 17:13:40 +0100 Subject: Ctrl: add setAfterAnimationState(StateType) --- core/src/ch/asynk/tankontank/game/Ctrl.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index f430846..203bed9 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -185,17 +185,10 @@ public class Ctrl implements Disposable public void setState(StateType nextState) { - setState(nextState, battle.getState(player)); - } - - public void setState(StateType nextState, StateType whenDone) - { if (nextState == StateType.ABORT) nextState = actionAborted(); else if (nextState == StateType.DONE) nextState = actionDone(); - else if (nextState == StateType.ANIMATION) - stateAfterAnimation = whenDone; this.state.leave(nextState); @@ -255,6 +248,11 @@ public class Ctrl implements Disposable state.touchUp(); } + public void setAfterAnimationState(StateType after) + { + stateAfterAnimation = after; + } + public void endGame() { game.setScreen(new OptionsScreen(game)); -- cgit v1.1-2-g2b99