summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-10 15:31:27 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-10 15:31:27 +0200
commitc7a1e0b7d559c1d6051a22d1fc0f8690b75a6445 (patch)
tree7b848f595fc9592b2631e814cab92d0c04b06919
parent27c4e7089df3c91f86da1ce841910a23528a0dcf (diff)
downloadRustAndDust-c7a1e0b7d559c1d6051a22d1fc0f8690b75a6445.zip
RustAndDust-c7a1e0b7d559c1d6051a22d1fc0f8690b75a6445.tar.gz
GameState: add done(), enter(boolean reset) -> enter(boolean normal)
-rw-r--r--core/src/ch/asynk/tankontank/game/GameCtrl.java9
-rw-r--r--core/src/ch/asynk/tankontank/game/GameState.java4
2 files changed, 10 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/GameCtrl.java b/core/src/ch/asynk/tankontank/game/GameCtrl.java
index 149596c..4d4c4f4 100644
--- a/core/src/ch/asynk/tankontank/game/GameCtrl.java
+++ b/core/src/ch/asynk/tankontank/game/GameCtrl.java
@@ -107,7 +107,7 @@ public class GameCtrl implements Disposable
setState(state, true);
}
- public void setState(GameState.State state, boolean reset)
+ public void setState(GameState.State state, boolean normal)
{
this.state.leave();
@@ -131,7 +131,7 @@ public class GameCtrl implements Disposable
break;
}
- this.state.enter(reset);
+ this.state.enter(normal);
}
public void abort()
@@ -139,6 +139,11 @@ public class GameCtrl implements Disposable
state.abort();
}
+ public void done()
+ {
+ state.done();
+ }
+
public void touchDown(float x, float y)
{
if (state.downInMap(x, y))
diff --git a/core/src/ch/asynk/tankontank/game/GameState.java b/core/src/ch/asynk/tankontank/game/GameState.java
index e8802bf..70568bd 100644
--- a/core/src/ch/asynk/tankontank/game/GameState.java
+++ b/core/src/ch/asynk/tankontank/game/GameState.java
@@ -10,12 +10,14 @@ public interface GameState
ANIMATION
};
- public void enter(boolean reset);
+ public void enter(boolean normal);
public void leave();
public void abort();
+ public void done();
+
public void touchDown();
public void touchUp();