summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-27 01:06:29 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-27 01:06:29 +0100
commit8c04bef05b21b012b5cdfd65bec5e8a9bb2fe32c (patch)
tree067b9d2a4ac6f7a1e657cd3f711d9cb3079812cf /core/src/ch/asynk/rustanddust
parent3b5a05b292eefeabcd1806e5b6eb90185d5fe915 (diff)
downloadRustAndDust-8c04bef05b21b012b5cdfd65bec5e8a9bb2fe32c.zip
RustAndDust-8c04bef05b21b012b5cdfd65bec5e8a9bb2fe32c.tar.gz
Order: add unitList activable, setActivable(UnitList)
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Order.java8
1 files changed, 8 insertions, 0 deletions
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<Unit>
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<Unit>
{
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<Unit>
this.engagement = Engagement.get(unit, target);
this.unit = unit;
}
+
+ public void setActivable(UnitList l)
+ {
+ for(Unit u : l)
+ activable.add(u);
+ }
}