mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
...
This commit is contained in:
parent
4e3fc521fb
commit
813dccfe0c
2 changed files with 9 additions and 9 deletions
|
@ -23,7 +23,14 @@ namespace SanAndreasUnity.Behaviours
|
|||
public float TimeElapsed { get; set; }
|
||||
}
|
||||
|
||||
public class NodeComparer : IComparer<PathNodeId>
|
||||
private struct NodePathfindingData
|
||||
{
|
||||
public float f, g;
|
||||
public PathNodeId parentId;
|
||||
public bool hasParent;
|
||||
}
|
||||
|
||||
private class NodeComparer : IComparer<PathNodeId>
|
||||
{
|
||||
private readonly NodePathfindingData[][] m_nodePathfindingDatas;
|
||||
|
||||
|
@ -137,7 +144,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
pathResult.TimeElapsed = (float)stopwatch.Elapsed.TotalSeconds;
|
||||
|
||||
UnityEngine.Debug.Log($"Path finding finished: time {pathResult.TimeElapsed}, num nodes {pathResult.Nodes?.Count ?? 0}, numModifiedDatas {numModifiedDatas}, g {pathResult.TotalWeight}, distance {pathResult.Distance}");
|
||||
UnityEngine.Debug.Log($"Path finding finished: time {pathResult.TimeElapsed * 1000} ms, num nodes {pathResult.Nodes?.Count ?? 0}, numModifiedDatas {numModifiedDatas}, g {pathResult.TotalWeight}, distance {pathResult.Distance}");
|
||||
|
||||
return pathResult;
|
||||
}
|
||||
|
|
|
@ -52,13 +52,6 @@ namespace SanAndreasUnity.Importing.Paths
|
|||
public static PathNodeId InvalidId => new PathNodeId { AreaID = -1, NodeID = -1 };
|
||||
}
|
||||
|
||||
public struct NodePathfindingData
|
||||
{
|
||||
public float f, g;
|
||||
public PathNodeId parentId;
|
||||
public bool hasParent;
|
||||
}
|
||||
|
||||
public struct PathNode : IEquatable<PathNode>
|
||||
{
|
||||
public UnityEngine.Vector3 Position { get; set; }
|
||||
|
|
Loading…
Add table
Reference in a new issue