Skip to content

Commit

Permalink
Fix no_diaognals setting
Browse files Browse the repository at this point in the history
  • Loading branch information
coryleeio committed May 29, 2017
1 parent b3ed5cd commit 92aceb4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
Binary file modified Example/Example.unity
Binary file not shown.
Binary file modified Example/Prefabs/Managers.prefab
Binary file not shown.
2 changes: 1 addition & 1 deletion Example/SceneBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void AddToMapFolder(GameObject go)
private void BuildMap()
{
var pathFinder = PathFinder.Instance;
pathFinder.Init(GridSizeX, GridSizeY, GridGraph.DiagonalOptions.DiagonalsWithoutCornerCutting, 4);
pathFinder.Init(GridSizeX, GridSizeY, Diagonals, 4);
for (int x = 0; x < GridSizeX; x++)
{
for (int y = 0; y < GridSizeY; y++)
Expand Down
2 changes: 1 addition & 1 deletion Pathfinding/GridGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void CalculateAllNeighbors(int sizeX, int sizeY)
NeighborOffsets.Add(downLeft);
NeighborOffsets.Add(downRight);
}
else
if(DiagonalSetting != DiagonalOptions.DiagonalsWithCornerCutting && DiagonalSetting != DiagonalOptions.DiagonalsWithoutCornerCutting && DiagonalSetting != DiagonalOptions.NoDiagonals)
{
throw new System.Exception("Not implemented");
}
Expand Down
4 changes: 4 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
- Example scene added
- README added
- MIT license added

## v0.1.1 - May 30th, 2017

- Fix no_diaognals setting not working in grid and demo
8 changes: 8 additions & 0 deletions RELEASE-NOTES.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 92aceb4

Please sign in to comment.