Skip to content

PathFind

Graydon edited this page Mar 21, 2017 · 7 revisions

public class PathFind

Base Class: MonoBehaviour

Fields

public ThreadProfiler m_pathfindProfiler
public int m_queuedPathFindCount
private Array32<PathUnit> m_pathUnits
private uint m_queueFirst
private uint m_queueLast
private uint m_calculating
private object m_queueLock
private object m_bufferLock
private Thread m_pathFindThread
private bool m_terminated
private int m_bufferMinPos
private int m_bufferMaxPos
private uint[] m_laneLocation
private Position[] m_laneTarget
private BufferItem[] m_buffer
private int[] m_bufferMin
private int[] m_bufferMax
private float m_maxLength
private uint m_startLaneA
private uint m_startLaneB
private uint m_endLaneA
private uint m_endLaneB
private uint m_vehicleLane
private byte m_startOffsetA
private byte m_startOffsetB
private byte m_vehicleOffset
private bool m_isHeavyVehicle
private bool m_ignoreBlocked
private bool m_stablePath
private Randomizer m_pathRandomizer
private uint m_pathFindIndex
private LaneType m_laneTypes
private VehicleType m_vehicleTypes

Properties

public bool IsAvailable { get; }

Methods

private void Awake()
private void OnDestroy()
public bool CalculatePath(uint unit, bool skipQueue)
public void WaitForAllPaths()
private void PathFindImplementation(uint unit, ref PathUnit data)
private void ProcessItem(BufferItem item, ushort nodeID, ref NetNode node, byte connectOffset, bool isMiddle)
private float CalculateLaneSpeed(byte startOffset, byte endOffset, ref NetSegment segment, Lane laneInfo)
private void ProcessItem(BufferItem item, ushort targetNode, bool targetDisabled, ushort segmentID, ref NetSegment segment, uint lane, byte offset, byte connectOffset)
private bool ProcessItem(BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment segment, ref int currentTargetIndex, byte connectOffset, bool enableVehicle, bool enablePedestrian)
private void ProcessItem(BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment segment, byte connectOffset, int laneIndex, uint lane)
private void AddBufferItem(BufferItem item, Position target)
private void GetLaneDirection(Position pathPos, out Direction direction, out LaneType type)
private void PathFindThread()

Clone this wiki locally