summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-17 10:56:31 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-17 10:56:31 +0100
commit2af45b7ef93cebe03c1e24bb12e04f0facb8d336 (patch)
tree92a309488f002a7b5aafe6cb5ce3eca8d2f8211b /core/src/ch/asynk/tankontank/game
parent75c39bb8ed061f58eabb37b3f222565ee63d17aa (diff)
downloadRustAndDust-2af45b7ef93cebe03c1e24bb12e04f0facb8d336.zip
RustAndDust-2af45b7ef93cebe03c1e24bb12e04f0facb8d336.tar.gz
Unit: add boolean isAce(), void setAce(boolean)
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java14
1 files changed, 14 insertions, 0 deletions
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()
{