diff --git a/.vs/AStarPathFinding/v16/.suo b/.vs/AStarPathFinding/v16/.suo index a6613cd..b587a27 100644 Binary files a/.vs/AStarPathFinding/v16/.suo and b/.vs/AStarPathFinding/v16/.suo differ diff --git a/AstarPathFinder.cs b/AstarPathFinder.cs index 07eb133..58be2d0 100644 --- a/AstarPathFinder.cs +++ b/AstarPathFinder.cs @@ -226,7 +226,8 @@ namespace AStarPathFinding for (int i = 0; i < 8; i++) { // 방향성 초기 값 - Form1.Direction = "Up"; + + Form1.Direction = "Down"; AstarNode openNode; @@ -386,6 +387,21 @@ namespace AStarPathFinding continue; } + if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.DRoad & Form1.Direction == "Down") + { + openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y]; + openNode.SetParent(focusNode); + openNode.SetGCost(gCost + openNode.parent.D); + openNode.SetHCost(openNode.parent.D - 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정 + + openNode.ParentDirection = neerAxis[i]; + + dicOpenList.Add(tempChildAxis, openNode); + tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open; + + continue; + } + ////대각선일시 자신의 주변을 체크 후 벽이있다면 무시한다(벽끼고 대각선이동 불가) //if (gCost == 14) //{ diff --git a/bin/Debug/AStarPathFinding.exe b/bin/Debug/AStarPathFinding.exe index 42e4349..a0837a7 100644 Binary files a/bin/Debug/AStarPathFinding.exe and b/bin/Debug/AStarPathFinding.exe differ diff --git a/bin/Debug/AStarPathFinding.pdb b/bin/Debug/AStarPathFinding.pdb index df48373..537ea9a 100644 Binary files a/bin/Debug/AStarPathFinding.pdb and b/bin/Debug/AStarPathFinding.pdb differ diff --git a/obj/Debug/AStarPathFinding.csprojAssemblyReference.cache b/obj/Debug/AStarPathFinding.csprojAssemblyReference.cache index 3fd4044..aed1b3b 100644 Binary files a/obj/Debug/AStarPathFinding.csprojAssemblyReference.cache and b/obj/Debug/AStarPathFinding.csprojAssemblyReference.cache differ diff --git a/obj/Debug/AStarPathFinding.exe b/obj/Debug/AStarPathFinding.exe index 42e4349..a0837a7 100644 Binary files a/obj/Debug/AStarPathFinding.exe and b/obj/Debug/AStarPathFinding.exe differ diff --git a/obj/Debug/AStarPathFinding.pdb b/obj/Debug/AStarPathFinding.pdb index df48373..537ea9a 100644 Binary files a/obj/Debug/AStarPathFinding.pdb and b/obj/Debug/AStarPathFinding.pdb differ