C# Класс CSL_Traffic.DefaultPathFind

This is the (almost) vanilla code found in the PathFind default class. What is changed: 1. IExtendedPathFind implementation 2. private -> protected 3. CalculatePath signature (uint unit, bool skipQueue, ExtendedVehicleType vehicleType)
Наследование: IExtendedPathFind
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
m_buffer BufferItem[]
m_bufferLock object
m_bufferMax int[]
m_bufferMaxPos int
m_bufferMin int[]
m_bufferMinPos int
m_calculating uint
m_endLaneA uint
m_endLaneB uint
m_ignoreBlocked bool
m_isHeavyVehicle bool
m_laneLocation uint[]
m_laneTarget PathUnit.Position[]
m_laneTypes NetInfo.LaneType
m_maxLength float
m_pathFindIndex uint
m_pathFindThread Thread
m_pathRandomizer Randomizer
m_pathUnits Array32
m_queueFirst uint
m_queueLast uint
m_queueLock object
m_stablePath bool
m_startLaneA uint
m_startLaneB uint
m_startOffsetA byte
m_startOffsetB byte
m_terminated bool
m_transportVehicle bool
m_vehicleLane uint
m_vehicleOffset byte
m_vehicleTypes VehicleInfo.VehicleType

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
CalculatePath ( uint unit, bool skipQueue, ExtendedVehicleType vehicleType ) : bool
OnAwake ( ) : void
OnDestroy ( ) : void
WaitForAllPaths ( ) : void

Защищенные методы

Метод Описание
AddBufferItem ( BufferItem item, PathUnit target ) : void
CalculateLaneSpeed ( byte startOffset, byte endOffset, NetSegment &segment, NetInfo laneInfo ) : float
GetLaneDirection ( PathUnit pathPos, NetInfo &direction, NetInfo &type ) : void
PathFindImplementation ( uint unit, PathUnit &data ) : void
PathFindThread ( ) : void
ProcessItem ( BufferItem item, ushort targetNode, ushort segmentID, NetSegment &segment, int &currentTargetIndex, byte connectOffset, bool enableVehicle, bool enablePedestrian ) : bool
ProcessItem ( BufferItem item, ushort nodeID, NetNode &node, byte connectOffset, bool isMiddle ) : void
ProcessItem ( BufferItem item, ushort targetNode, bool targetDisabled, ushort segmentID, NetSegment &segment, uint lane, byte offset, byte connectOffset ) : void
ProcessItem ( BufferItem item, ushort targetNode, ushort segmentID, NetSegment &segment, byte connectOffset, int laneIndex, uint lane ) : void

Описание методов

AddBufferItem() защищенный метод

protected AddBufferItem ( BufferItem item, PathUnit target ) : void
item BufferItem
target PathUnit
Результат void

CalculateLaneSpeed() защищенный метод

protected CalculateLaneSpeed ( byte startOffset, byte endOffset, NetSegment &segment, NetInfo laneInfo ) : float
startOffset byte
endOffset byte
segment NetSegment
laneInfo NetInfo
Результат float

CalculatePath() публичный метод

public CalculatePath ( uint unit, bool skipQueue, ExtendedVehicleType vehicleType ) : bool
unit uint
skipQueue bool
vehicleType ExtendedVehicleType
Результат bool

GetLaneDirection() защищенный метод

protected GetLaneDirection ( PathUnit pathPos, NetInfo &direction, NetInfo &type ) : void
pathPos PathUnit
direction NetInfo
type NetInfo
Результат void

OnAwake() публичный метод

public OnAwake ( ) : void
Результат void

OnDestroy() публичный метод

public OnDestroy ( ) : void
Результат void

PathFindImplementation() защищенный метод

protected PathFindImplementation ( uint unit, PathUnit &data ) : void
unit uint
data PathUnit
Результат void

PathFindThread() защищенный метод

protected PathFindThread ( ) : void
Результат void

ProcessItem() защищенный метод

protected ProcessItem ( BufferItem item, ushort targetNode, ushort segmentID, NetSegment &segment, int &currentTargetIndex, byte connectOffset, bool enableVehicle, bool enablePedestrian ) : bool
item BufferItem
targetNode ushort
segmentID ushort
segment NetSegment
currentTargetIndex int
connectOffset byte
enableVehicle bool
enablePedestrian bool
Результат bool

ProcessItem() защищенный метод

protected ProcessItem ( BufferItem item, ushort nodeID, NetNode &node, byte connectOffset, bool isMiddle ) : void
item BufferItem
nodeID ushort
node NetNode
connectOffset byte
isMiddle bool
Результат void

ProcessItem() защищенный метод

protected ProcessItem ( BufferItem item, ushort targetNode, bool targetDisabled, ushort segmentID, NetSegment &segment, uint lane, byte offset, byte connectOffset ) : void
item BufferItem
targetNode ushort
targetDisabled bool
segmentID ushort
segment NetSegment
lane uint
offset byte
connectOffset byte
Результат void

ProcessItem() защищенный метод

protected ProcessItem ( BufferItem item, ushort targetNode, ushort segmentID, NetSegment &segment, byte connectOffset, int laneIndex, uint lane ) : void
item BufferItem
targetNode ushort
segmentID ushort
segment NetSegment
connectOffset byte
laneIndex int
lane uint
Результат void

WaitForAllPaths() публичный метод

public WaitForAllPaths ( ) : void
Результат void

Описание свойств

m_buffer защищенное свойство

protected BufferItem[] m_buffer
Результат BufferItem[]

m_bufferLock защищенное свойство

protected object m_bufferLock
Результат object

m_bufferMax защищенное свойство

protected int[] m_bufferMax
Результат int[]

m_bufferMaxPos защищенное свойство

protected int m_bufferMaxPos
Результат int

m_bufferMin защищенное свойство

protected int[] m_bufferMin
Результат int[]

m_bufferMinPos защищенное свойство

protected int m_bufferMinPos
Результат int

m_calculating защищенное свойство

protected uint m_calculating
Результат uint

m_endLaneA защищенное свойство

protected uint m_endLaneA
Результат uint

m_endLaneB защищенное свойство

protected uint m_endLaneB
Результат uint

m_ignoreBlocked защищенное свойство

protected bool m_ignoreBlocked
Результат bool

m_isHeavyVehicle защищенное свойство

protected bool m_isHeavyVehicle
Результат bool

m_laneLocation защищенное свойство

protected uint[] m_laneLocation
Результат uint[]

m_laneTarget защищенное свойство

protected PathUnit.Position[] m_laneTarget
Результат PathUnit.Position[]

m_laneTypes защищенное свойство

protected NetInfo.LaneType m_laneTypes
Результат NetInfo.LaneType

m_maxLength защищенное свойство

protected float m_maxLength
Результат float

m_pathFindIndex защищенное свойство

protected uint m_pathFindIndex
Результат uint

m_pathFindThread защищенное свойство

protected Thread m_pathFindThread
Результат Thread

m_pathRandomizer защищенное свойство

protected Randomizer m_pathRandomizer
Результат Randomizer

m_pathUnits защищенное свойство

protected Array32 m_pathUnits
Результат Array32

m_queueFirst защищенное свойство

protected uint m_queueFirst
Результат uint

m_queueLast защищенное свойство

protected uint m_queueLast
Результат uint

m_queueLock защищенное свойство

protected object m_queueLock
Результат object

m_stablePath защищенное свойство

protected bool m_stablePath
Результат bool

m_startLaneA защищенное свойство

protected uint m_startLaneA
Результат uint

m_startLaneB защищенное свойство

protected uint m_startLaneB
Результат uint

m_startOffsetA защищенное свойство

protected byte m_startOffsetA
Результат byte

m_startOffsetB защищенное свойство

protected byte m_startOffsetB
Результат byte

m_terminated защищенное свойство

protected bool m_terminated
Результат bool

m_transportVehicle защищенное свойство

protected bool m_transportVehicle
Результат bool

m_vehicleLane защищенное свойство

protected uint m_vehicleLane
Результат uint

m_vehicleOffset защищенное свойство

protected byte m_vehicleOffset
Результат byte

m_vehicleTypes защищенное свойство

protected VehicleInfo.VehicleType m_vehicleTypes
Результат VehicleInfo.VehicleType