private void Draw(Vector3Int from, Vector3Int to) { ReplaceMany(_prevPath, emptyTile); _prevPath = GridPathfinder.FindPath(from, to, GridGeometry.Hex); ReplaceMany(_prevPath, highlightedTile); ReplaceOne(to, selectedTile); }
private GridPosition[] SafeBuildPath(GridPosition from, GridPosition to) { if (size.Contains(from) && size.Contains(to)) { return(GridPathfinder.FindPath(from, to, geometry.Value, size)); } else if (size.Contains(to)) { return(new[] { to }); } else { return(new GridPosition[] { }); } }
public List <GridNode> FindPath(GridNode start, GridNode end) { return(GridPathfinder.FindPath(start, end)); }
public void FindPath(HexCell fromCell, HexCell toCell, Unit unit) { pathfinder.FindPath(fromCell, toCell, unit); }