public void CloseNode(AStarNode node) { UInt32 pos = GetNodeIndex(node); if (pos >= 512) { Console.WriteLine("closeNodePosition failed....."); return; } openNodes[(int)pos] = false; }
public AStarNodes() { nodes = new AStarNode[512]; for (int i = 0; i < 512; i++) { nodes[i] = new AStarNode(); } curNode = 0; openNodes.SetAll(false); }
public void OpenNode(AStarNode node) { UInt32 pos = GetNodeIndex(node); if (pos >= 512) { Console.WriteLine("openNode pos failed"); return; } openNodes[(int)pos] = false; }
public uint GetNodeIndex(AStarNode node) { for (uint i = 0; i < 512; i++) { if (nodes[i] == node) return i; } return 520; }