Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfLobsterMan committed Dec 18, 2021
1 parent f5494cd commit 0bfeadf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Runtime/Scripts/GOAPGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ public override void Initialize(IGraphOwner _graphOwner)
if (node.Value is GOAPAction action)
AvailableActions.Add(action);
}
AvailableActions.QuickSort((a, center) =>
AvailableActions.QuickSort((a, b) =>
{
if (a.Position.y > center.Position.y)
if (a.Position.y > b.Position.y)
return 1;
if (a.Position.y == b.Position.y)
return 0;
return -1;
});
foreach (var action in AvailableActions)
Expand Down

0 comments on commit 0bfeadf

Please sign in to comment.