diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-13 12:02:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-13 12:02:43 +0200 |
commit | 9f12b0c465f07c110a5f75c032b1943fc1d36080 (patch) | |
tree | c1d861f53bbd8c6cdcec2096f456aaad4ad449be /core/src/ch/asynk/tankontank | |
parent | a139e8454ac4c9c2b246d758c677cbc02d6740a2 (diff) | |
download | RustAndDust-9f12b0c465f07c110a5f75c032b1943fc1d36080.zip RustAndDust-9f12b0c465f07c110a5f75c032b1943fc1d36080.tar.gz |
Factory: now use Unit.UnitType
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Factory.java | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Factory.java b/core/src/ch/asynk/tankontank/game/Factory.java index 5e36f7e..d5d20c3 100644 --- a/core/src/ch/asynk/tankontank/game/Factory.java +++ b/core/src/ch/asynk/tankontank/game/Factory.java @@ -49,51 +49,56 @@ public class Factory implements Board.TileBuilder, Disposable public Unit getUnit(UnitType t) { Unit u = null; + Unit.UnitType ut = Unit.UnitType.HARD_TARGET; switch(t) { case GE_AT_GUN: - u = new Unit(Army.GE, false, 3, 8, 9, 1, pawnAtlas, "ge-at-gun", "head"); + ut = Unit.UnitType.AT_GUN; + u = new Unit(Army.GE, ut, 3, 8, 9, 1, pawnAtlas, "ge-at-gun", "head"); break; case GE_INFANTRY: - u = new Unit(Army.GE, false, 1, 7, 10, 1, pawnAtlas, "ge-infantry", "head"); + ut = Unit.UnitType.INFANTRY; + u = new Unit(Army.GE, ut, 1, 7, 10, 1, pawnAtlas, "ge-infantry", "head"); break; case GE_KINGTIGER: - u = new Unit(Army.GE, false, 3, 12, 1, pawnAtlas, "ge-kingtiger", "head"); + u = new Unit(Army.GE, ut, 3, 12, 1, pawnAtlas, "ge-kingtiger", "head"); break; case GE_PANZER_IV: - u = new Unit(Army.GE, false, 2, 9, 2, pawnAtlas, "ge-panzer-iv", "head"); + u = new Unit(Army.GE, ut, 2, 9, 2, pawnAtlas, "ge-panzer-iv", "head"); break; case GE_PANZER_IV_HQ: - u = new Unit(Army.GE, true, 2, 9, 2, pawnAtlas, "ge-panzer-iv-hq", "head"); + u = new Unit(Army.GE, ut, 2, 9, 2, pawnAtlas, "ge-panzer-iv-hq", "head"); break; case GE_TIGER: - u = new Unit(Army.GE, false, 3, 11, 1, pawnAtlas, "ge-tiger", "head"); + u = new Unit(Army.GE, ut, 3, 11, 1, pawnAtlas, "ge-tiger", "head"); break; case GE_WESPE: - u = new Unit(Army.GE, false, 5, 8, 1, pawnAtlas, "ge-wespe", "head"); + u = new Unit(Army.GE, ut, 5, 8, 1, pawnAtlas, "ge-wespe", "head"); break; case US_AT_GUN: - u = new Unit(Army.US, false, 1, 7, 10, 1, pawnAtlas, "us-at-gun", "head"); + ut = Unit.UnitType.AT_GUN; + u = new Unit(Army.US, ut, 1, 7, 10, 1, pawnAtlas, "us-at-gun", "head"); break; case US_INFANTRY: - u = new Unit(Army.US, false, 1, 7, 10, 1, pawnAtlas, "us-infantry", "head"); + ut = Unit.UnitType.INFANTRY; + u = new Unit(Army.US, ut, 1, 7, 10, 1, pawnAtlas, "us-infantry", "head"); break; case US_PERSHING: - u = new Unit(Army.US, false, 3, 10, 2, pawnAtlas, "us-pershing", "head"); + u = new Unit(Army.US, ut, 3, 10, 2, pawnAtlas, "us-pershing", "head"); break; case US_PERSHING_HQ: - u = new Unit(Army.US, true, 3, 10, 2, pawnAtlas, "us-pershing-hq", "head"); + u = new Unit(Army.US, ut, 3, 10, 2, pawnAtlas, "us-pershing-hq", "head"); break; case US_PRIEST: - u = new Unit(Army.US, false, 5, 8, 1, pawnAtlas, "us-priest", "head"); + u = new Unit(Army.US, ut, 5, 8, 1, pawnAtlas, "us-priest", "head"); break; case US_SHERMAN: - u = new Unit(Army.US, false, 2, 9, 2, pawnAtlas, "us-sherman", "us-sherman-head"); + u = new Unit(Army.US, ut, 2, 9, 2, pawnAtlas, "us-sherman", "us-sherman-head"); break; case US_SHERMAN_HQ: - u = new Unit(Army.US, true, 2, 9, 2, pawnAtlas, "us-sherman-hq", "head"); + u = new Unit(Army.US, ut, 2, 9, 2, pawnAtlas, "us-sherman-hq", "head"); break; case US_WOLVERINE: - u = new Unit(Army.US, false, 3, 8, 3, pawnAtlas, "us-wolverine", "head"); + u = new Unit(Army.US, ut, 3, 8, 3, pawnAtlas, "us-wolverine", "head"); break; } |