From 2e62fe5a8430943ae3a6b993a7d6ba4f202684e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 28 Oct 2014 23:05:27 +0100 Subject: Unit: add overlays methods showMoveable(), showAttack(), showTarget() --- core/src/ch/asynk/tankontank/game/Unit.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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); + } } -- cgit v1.1-2-g2b99