summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-18 21:47:04 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-18 21:47:04 +0200
commita8f452db636787830cce2cfce91eec3d24e30619 (patch)
treee9c688de93ebcec13de01ad66acb3e70a627b057 /core
parent0007e53120b943316d17a92d2fec8ee06c0b040b (diff)
downloadRustAndDust-a8f452db636787830cce2cfce91eec3d24e30619.zip
RustAndDust-a8f452db636787830cce2cfce91eec3d24e30619.tar.gz
Ctrl: fix notification position, and push/write
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 244569e..422e8eb 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -450,7 +450,7 @@ public abstract class Ctrl implements Disposable
storeGameState();
synched = true;
}
- checkPlayer(battle.getState());
+ checkPlayer(battle.getState(), (mode == Mode.PLAY));
}
}
@@ -495,20 +495,20 @@ public abstract class Ctrl implements Disposable
}
battle.getPlayer().burnDownOneAp();
- hud.notify("1 Action Point burnt");
- checkPlayer(nextState);
+ hud.notify("1 Action Point burnt", Position.BOTTOM_CENTER);
+ checkPlayer(nextState, (mode == Mode.PLAY));
storeGameState();
}
- private void checkPlayer(StateType nextState)
+ private void checkPlayer(StateType nextState, boolean notify)
{
if (battle.getPlayer().apExhausted()) {
- if (mode == Mode.PLAY)
- hud.notify("No more Action Points");
+ if (notify)
+ hud.notify("No more Action Points", Position.MIDDLE_CENTER);
postTurnDone();
} else if (!battle.getPlayer().canDoSomething()) {
- if (mode == Mode.PLAY)
- hud.notify("No available Actions");
+ if (notify)
+ hud.notify("No available Actions", Position.MIDDLE_CENTER);
postTurnDone();
} else {
post(nextState);
@@ -563,9 +563,9 @@ public abstract class Ctrl implements Disposable
else {
hud.update();
if (battle.getPlayer().hasReinforcement())
- hud.notify("You have reinforcement");
+ hud.pushNotify("You have reinforcement", Position.MIDDLE_CENTER);
if (!battle.getPlayer().canDoSomething()) {
- hud.notify("No available Actions");
+ hud.pushNotify("No available Actions", Position.MIDDLE_CENTER);
postTurnDone();
} else {
post(battle.getState());