From 83a4f28b17cae4f50f1cb08c6c0fb48749a5926d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 22 Mar 2016 14:55:43 +0100 Subject: Map5Marshal: add clearMarshalUnits() --- core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java index b6f9a18..a961b11 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java @@ -27,6 +27,8 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal { private static UnitList units = new UnitList(30); + public void clearMarshalUnits() { units.clear(); } + public Map5Marshal(final RustAndDust game, Texture map, SelectedTile hex) { super(game, map, hex); @@ -261,12 +263,11 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal loadMap(v.get("map")); else if(mode == Marshal.Mode.ORDERS) loadOrders(v.get("orders")); - units.clear(); } public void loadPlayers(JsonValue v, Player[] players) { - units.clear(); + clearMarshalUnits(); players[0] = loadPlayer(v.get("players").get(0)); players[1] = loadPlayer(v.get("players").get(1)); } -- cgit v1.1-2-g2b99