move grid logic from screen solver to IsoGrid.cs

This commit is contained in:
2016-12-24 04:41:02 +07:00
parent 72c0850445
commit af5077a96d
7 changed files with 447 additions and 173 deletions

View File

@@ -47,7 +47,7 @@
return this;
}
public Node Clear(IsoIPool<Node> node_pool, IsoIPool<Item> item_pool) {
public Node Clear(IsoIPool<Node> node_pool, IsoIPool<Item> item_pool) {
ClearChildren(node_pool, item_pool);
ClearContents(item_pool);
return Init(null, IsoRect.zero);
@@ -158,19 +158,6 @@
}
}
//
// NodePool
//
class NodePool : IsoPool<Node> {
public NodePool(int capacity) : base(capacity) {
}
public override Node CreateItem() {
return new Node();
}
}
//
// ItemPool
//
@@ -184,6 +171,19 @@
}
}
//
// NodePool
//
class NodePool : IsoPool<Node> {
public NodePool(int capacity) : base(capacity) {
}
public override Node CreateItem() {
return new Node();
}
}
//
// Members
//