From 2af45b7ef93cebe03c1e24bb12e04f0facb8d336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 17 Nov 2014 10:56:31 +0100 Subject: Unit: add boolean isAce(), void setAce(boolean) --- core/src/ch/asynk/tankontank/game/Unit.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index f7369f6..bcb9e3c 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -16,6 +16,7 @@ public class Unit extends HeadedPawn public static final int TARGET = 1; public static final int FIRE = 2; public static final int MAY_FIRE = 3; + public static final int ACE = 4; public enum UnitType implements Pawn.PawnType { @@ -57,12 +58,14 @@ public class Unit extends HeadedPawn public int mpLeft; public UnitType type; public UnitId id; + public boolean ace; private boolean hasMoved; private boolean hasFired; protected Unit(Army army, String pawn, String head, TextureAtlas pawns, TextureAtlas overlays) { super(army, pawn, head, pawns, overlays); + ace = false; } // hard tager @@ -101,6 +104,17 @@ public class Unit extends HeadedPawn return (Hex) getTile(); } + public boolean isAce() + { + return ace; + } + + public void setAce(boolean ace) + { + this.ace = ace; + enableOverlay(ACE, ace); + } + @Override public int getMovementPoints() { -- cgit v1.1-2-g2b99