summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/OkCancel.java1
3 files changed, 20 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 612e4cb..e8b6fd7 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -283,7 +283,10 @@ public class Ctrl implements Disposable
public boolean checkDeploymentDone()
{
- return battle.deploymentDone(player);
+ boolean done = battle.deploymentDone(player);
+ if (done)
+ hud.askEndDeployment();
+ return done;
}
public void reinforcementHit()
@@ -296,6 +299,11 @@ public class Ctrl implements Disposable
// Hud callbacks
+ public void endDeployment()
+ {
+ setState(StateType.DONE);
+ }
+
public void endGame()
{
game.setScreen(new OptionsScreen(game));
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 91215d0..6d8961a 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -234,6 +234,10 @@ public class Hud implements Disposable, Animation
if (ok)
ctrl.endPlayerTurn(true);
break;
+ case END_DEPLOYMENT:
+ if (ok)
+ ctrl.endDeployment();
+ break;
}
}
@@ -276,6 +280,12 @@ public class Hud implements Disposable, Animation
pushDialog(okCancel);
}
+ public void askEndDeployment()
+ {
+ okCancel.show("Deployment unit count reached.\nEnd Deployment phase ?", OkCancel.Action.END_DEPLOYMENT);
+ pushDialog(okCancel);
+ }
+
public void engagementSummary(Map.Engagement e, float volume)
{
engagement.show(e, Position.BOTTOM_CENTER, volume);
diff --git a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
index 0b05d6e..f48bcd4 100644
--- a/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
+++ b/core/src/ch/asynk/tankontank/game/hud/OkCancel.java
@@ -22,6 +22,7 @@ public class OkCancel extends Patch
EXIT_BOARD,
ABORT_TURN,
END_TURN,
+ END_DEPLOYMENT,
}
public OkCancel(BitmapFont font, TextureAtlas atlas)