summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-28 23:05:27 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-28 23:05:27 +0100
commit2e62fe5a8430943ae3a6b993a7d6ba4f202684e2 (patch)
treec16b2c66d5cd2ad8e345d408e9a2b428357fecae /core
parente84dd5bba3605c704daf689b8e26ec6e50cb2443 (diff)
downloadRustAndDust-2e62fe5a8430943ae3a6b993a7d6ba4f202684e2.zip
RustAndDust-2e62fe5a8430943ae3a6b993a7d6ba4f202684e2.tar.gz
Unit: add overlays methods showMoveable(), showAttack(), showTarget()
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index 5ae19b0..23a3248 100644
--- a/core/src/ch/asynk/tankontank/game/Unit.java
+++ b/core/src/ch/asynk/tankontank/game/Unit.java
@@ -10,7 +10,9 @@ import ch.asynk.tankontank.engine.Orientation;
public class Unit extends HeadedPawn
{
- public static final int DISABLED = 0;
+ public static final int MOVE = 0;
+ public static final int ATTACK = 1;
+ public static final int TARGET = 2;
public enum UnitType implements Pawn.PawnType
{
@@ -222,4 +224,19 @@ public class Unit extends HeadedPawn
{
hasMoved = false;
}
+
+ public void showMoveable(boolean enable)
+ {
+ enableOverlay(MOVE, enable);
+ }
+
+ public void showAttack(boolean enable)
+ {
+ enableOverlay(ATTACK, enable);
+ }
+
+ public void showTarget(boolean enable)
+ {
+ enableOverlay(TARGET, enable);
+ }
}