public void StartFindPath(DijkstraNode[] pathfindingNetwork, DefinitionNode[] definitionNodes, int startNodeIndex) { ResetNetwork(pathfindingNetwork); _openSet.AssignArray(pathfindingNetwork); _closedSet.Clear(); _openSet.Add(startNodeIndex); pathfindingNetwork[startNodeIndex].Priority = 0f; }
public void Start(AstarNode[] pathfindingNetwork, DefinitionNode[] definitionNodes, int startNodeIndex, int targetNodeIndex, float neededClearance, PathfindaxCollisionCategory collisionCategory) { StartNodeIndex = startNodeIndex; TargetNodeIndex = targetNodeIndex; _neededClearance = neededClearance; _collisionCategory = collisionCategory; _pathfindingNetwork = pathfindingNetwork; _definitionNodes = definitionNodes; _openSet.AssignArray(pathfindingNetwork); _closedSet.Clear(); _openSet.Add(startNodeIndex); }
public void Contains(LookupArray lookupArray, int[] indexesToAdd) { for (int j = 0; j < 256; j++) { foreach (var i in indexesToAdd) { lookupArray.Occupy(i); } foreach (var i in indexesToAdd) { Assert.IsTrue(lookupArray.Contains(i)); } lookupArray.Clear(); for (int i = 0; i < lookupArray.Capacity; i++) { Assert.IsFalse(lookupArray.Contains(i)); } } }
public void StartFindPath(AstarNode[] pathfindingNetwork, DefinitionNode[] definitionNodes, int startNodeIndex) { _openSet.AssignArray(pathfindingNetwork); _closedSet.Clear(); _openSet.Add(startNodeIndex); }