수정중
This commit is contained in:
Binary file not shown.
@@ -127,6 +127,9 @@ namespace AStarPathFinding
|
||||
switch(tableStateData[i, j])
|
||||
{
|
||||
case eTileState.Start:
|
||||
|
||||
|
||||
|
||||
case eTileState.Goal:
|
||||
case eTileState.Wall:
|
||||
case eTileState.Road:
|
||||
@@ -330,33 +333,33 @@ namespace AStarPathFinding
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
|
||||
{
|
||||
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||
openNode.SetParent(focusNode);
|
||||
openNode.SetGCost(gCost + openNode.parent.R);
|
||||
openNode.SetHCost(openNode.parent.R + 1000);
|
||||
openNode.ParentDirection = neerAxis[i];
|
||||
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.RRoad & Form1.Direction == "Left")
|
||||
//{
|
||||
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||
// openNode.SetParent(focusNode);
|
||||
// openNode.SetGCost(gCost + openNode.parent.R);
|
||||
// openNode.SetHCost(openNode.parent.R + 1000);
|
||||
// openNode.ParentDirection = neerAxis[i];
|
||||
|
||||
dicOpenList.Add(tempChildAxis, openNode);
|
||||
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||
// dicOpenList.Add(tempChildAxis, openNode);
|
||||
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||
|
||||
continue;
|
||||
}
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
|
||||
{
|
||||
openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||
openNode.SetParent(focusNode);
|
||||
openNode.SetGCost(gCost + openNode.parent.L);
|
||||
openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
|
||||
openNode.ParentDirection = neerAxis[i];
|
||||
//if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Right")
|
||||
//{
|
||||
// openNode = tableNodeData[tempChildAxis.X, tempChildAxis.Y];
|
||||
// openNode.SetParent(focusNode);
|
||||
// openNode.SetGCost(gCost + openNode.parent.L);
|
||||
// openNode.SetHCost(openNode.parent.L + 1000); // 휴리스틱 값 수정해서 길 따라갈 수 있게 점수를 낮춰줌 수정
|
||||
// openNode.ParentDirection = neerAxis[i];
|
||||
|
||||
dicOpenList.Add(tempChildAxis, openNode);
|
||||
tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||
// dicOpenList.Add(tempChildAxis, openNode);
|
||||
// tableStateData[tempChildAxis.X, tempChildAxis.Y] = eTileState.Open;
|
||||
|
||||
continue;
|
||||
}
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (tableStateData[tempChildAxis.X, tempChildAxis.Y] == eTileState.LRoad & Form1.Direction == "Left")
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user