diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-20 10:43:53 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-20 10:43:53 +0100 |
commit | 10311c96e531df6869f78fe9c9c92052798f8753 (patch) | |
tree | 1cf6265d99f4fd055a0882d0cc9d64cd036a9d93 /core | |
parent | efc2a97e12612f3ec515b1fe10c4151f1a1ccb17 (diff) | |
download | RustAndDust-10311c96e531df6869f78fe9c9c92052798f8753.zip RustAndDust-10311c96e531df6869f78fe9c9c92052798f8753.tar.gz |
Engagement: remove attackerArmy and defenderArmy
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Engagement.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/EngagementPanel.java | 4 |
3 files changed, 2 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Engagement.java b/core/src/ch/asynk/tankontank/game/Engagement.java index df50123..1dc7ce6 100644 --- a/core/src/ch/asynk/tankontank/game/Engagement.java +++ b/core/src/ch/asynk/tankontank/game/Engagement.java @@ -36,8 +36,6 @@ public class Engagement implements Disposable, Pool.Poolable public Unit attacker; public Unit defender; public List<Unit> assists; - public Army attackerArmy; - public Army defenderArmy; public boolean success; public int d1; public int d2; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 6be1a9c..a924f29 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -543,8 +543,6 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS e.set(cnt, flk, def, tdf, wdf); e.success = success; - e.attackerArmy = ctrl.player.army; - e.defenderArmy = ctrl.opponent.army; } private int doEngagement(Engagement e) diff --git a/core/src/ch/asynk/tankontank/game/hud/EngagementPanel.java b/core/src/ch/asynk/tankontank/game/hud/EngagementPanel.java index e524bf7..9e9df1c 100644 --- a/core/src/ch/asynk/tankontank/game/hud/EngagementPanel.java +++ b/core/src/ch/asynk/tankontank/game/hud/EngagementPanel.java @@ -94,9 +94,9 @@ public class EngagementPanel extends Patch implements Animation attackR.write(String.format(" %2d", e.attackSum)); defenseR.write(String.format(" %2d", e.defenseSum)); if (e.success) - winner = ((e.attackerArmy == Army.US) ? usFlag : geFlag); + winner = ((e.attacker.getArmy() == Army.US) ? usFlag : geFlag); else - winner = ((e.attackerArmy == Army.US) ? geFlag : usFlag); + winner = ((e.attacker.getArmy() == Army.US) ? geFlag : usFlag); this.position = position; placeElements(); |