summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-10 10:03:11 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-10 10:03:11 +0200
commit86647056f08134c535492bc50e6bc3c9b1059a4b (patch)
treeef8a991ef920c562f629a26500d0f60f0b4d88df /core/src
parent861c1e81b0d6f3a5f2e2a1110faa90b7db48c7f7 (diff)
downloadRustAndDust-86647056f08134c535492bc50e6bc3c9b1059a4b.zip
RustAndDust-86647056f08134c535492bc50e6bc3c9b1059a4b.tar.gz
Unit: add static boolean blockId
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Unit.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Unit.java b/core/src/ch/asynk/rustanddust/game/Unit.java
index 4dd04ee..38b1d7e 100644
--- a/core/src/ch/asynk/rustanddust/game/Unit.java
+++ b/core/src/ch/asynk/rustanddust/game/Unit.java
@@ -23,6 +23,7 @@ public class Unit extends HeadedPawn
public static final int FLANK_ATTACK_BONUS = 1;
+ public static boolean blockId = false;
public static int unitId = 1;
public enum UnitType implements Pawn.PawnType
@@ -74,8 +75,10 @@ public class Unit extends HeadedPawn
super(army, chit, body, turret, overlays);
hq = false;
ace = false;
- this.id = unitId;
- unitId += 1;
+ if (!blockId) {
+ this.id = unitId;
+ unitId += 1;
+ }
this.entryZone = null;
this.exitZone = null;
}