private void Start() { var pathHeuristic = new EuclideanHeuristic(); var graph = new TilemapGraph(_tilemap); var graphNodeCost = new NodeCostChainOfResponsibilities(new List <IGraphNodeCost> { new ObstacleGraphNodeCost(_obstacles), new FloorGraphNodeCost(_tilemap) }); _pathFinder = new PathFinder(graph, graphNodeCost, pathHeuristic); _reevaluatePathInterval = 3; }
private void Start() { var pathHeuristic = new ManhattanHeuristic(); var graph = new TilemapGraph(_floor); _obstacleNodeCost = new ObstacleGraphNodeCost(_obstacles); _floorNodeCost = new FloorGraphNodeCost(_floor); _graphNode = new NodeCostChainOfResponsibilities(new List <IGraphNodeCost> { _obstacleNodeCost, _floorNodeCost }); _pathFinder = new PathFinder(graph, _graphNode, pathHeuristic); }