From 8c04bef05b21b012b5cdfd65bec5e8a9bb2fe32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 27 Mar 2016 01:06:29 +0100 Subject: Order: add unitList activable, setActivable(UnitList) --- core/src/ch/asynk/rustanddust/game/Order.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/ch/asynk/rustanddust/game/Order.java b/core/src/ch/asynk/rustanddust/game/Order.java index fc8925a..9f24f53 100644 --- a/core/src/ch/asynk/rustanddust/game/Order.java +++ b/core/src/ch/asynk/rustanddust/game/Order.java @@ -38,6 +38,7 @@ public class Order implements Disposable, Pool.Poolable, Comparable public Unit unit; public Move move; public Engagement engagement; + public UnitList activable = new UnitList(4); private Order() { @@ -55,6 +56,7 @@ public class Order implements Disposable, Pool.Poolable, Comparable { this.type = OrderType.NONE; this.unit = null; + this.activable.clear(); if (this.move != null) { this.move.dispose(); this.move = null; @@ -103,4 +105,10 @@ public class Order implements Disposable, Pool.Poolable, Comparable this.engagement = Engagement.get(unit, target); this.unit = unit; } + + public void setActivable(UnitList l) + { + for(Unit u : l) + activable.add(u); + } } -- cgit v1.1-2-g2b99