diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index d33e688..7419a10 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -22,11 +22,38 @@ public class Unit extends HeadedPawn private boolean hasMoved; private boolean hasFired; - public Unit(TextureAtlas atlas, String pawn, String head) + protected Unit(TextureAtlas atlas, String pawn, String head) { super(atlas, pawn, head); - hasMoved = false; - hasFired = false; + } + + // hard tager + public Unit(Army army, boolean hq, int range, int defense, int movementPoints, TextureAtlas atlas, String unit, String head) + { + super(atlas, unit, head); + this.army = army; + this.hq = hq; + this.rng = range; + this.def = defense; + this.mp = movementPoints; + this.ht = true; + this.hasMoved = false; + this.hasFired = false; + } + + // soft tager + public Unit(Army army, boolean hq, int range, int defense, int concealedDefense, int movementPoints, TextureAtlas atlas, String unit, String head) + { + super(atlas, unit, head); + this.army = army; + this.hq = hq; + this.rng = range; + this.def = defense; + this.cdef = concealedDefense; + this.mp = movementPoints; + this.ht = false; + this.hasMoved = false; + this.hasFired = false; } @Override @@ -130,29 +157,4 @@ public class Unit extends HeadedPawn { hasMoved = false; } - - // hard tager - public Unit(Army army, boolean hq, int range, int defense, int movementPoints, TextureAtlas atlas, String unit, String head) - { - super(atlas, unit, head); - this.army = army; - this.hq = hq; - this.rng = range; - this.def = defense; - this.mp = movementPoints; - this.ht = true; - } - - // soft tager - public Unit(Army army, boolean hq, int range, int defense, int concealedDefense, int movementPoints, TextureAtlas atlas, String unit, String head) - { - super(atlas, unit, head); - this.army = army; - this.hq = hq; - this.rng = range; - this.def = defense; - this.cdef = concealedDefense; - this.mp = movementPoints; - this.ht = false; - } } |