C# Class TrafficManager.Custom.PathFinding.CustomPathFind

Inheritance: PathFind
显示文件 Open project: Katalyst6/CSL.TransitAddonMod

Public Properties

Property Type Description
IsMasterPathFind bool
SYNC_TIMEOUT int
_failedPathFinds uint
_succeededPathFinds uint

Private Properties

Property Type Description
AddBufferItem void
CalculateLaneSpeed float
FindNthCompatibleLane int
GetLaneDirection void
HandleLaneMergesAndSplits void
PathFindThread void
ProcessItem2 void
ProcessItemCosts bool
ProcessItemCosts bool
ProcessItemMain void
ProcessItemPedBicycle void

Public Methods

Method Description
CalculatePath ( ExtVehicleType vehicleType, uint unit, bool skipQueue ) : bool

Protected Methods

Method Description
Awake ( ) : void
CanLanesConnect ( uint laneId1, uint laneId2 ) : bool
CanUseLane ( bool debug, ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo ) : bool
GetLaneSpeedLimit ( ushort segmentId, uint laneIndex, uint laneId, NetInfo lane ) : float
IsLaneArrowChangerEnabled ( ) : bool
OnDestroy ( ) : void
PathFindImplementation ( uint unit, PathUnit &data ) : void

Private Methods

Method Description
AddBufferItem ( BufferItem item, PathUnit target ) : void
CalculateLaneSpeed ( float speedLimit, byte startOffset, byte endOffset, NetSegment &segment, NetInfo laneInfo ) : float
FindNthCompatibleLane ( uint &indexBySimilarLaneIndex, int prevRightSimilarLaneIndex ) : int
GetLaneDirection ( PathUnit pathPos, NetInfo &direction, NetInfo &type ) : void
HandleLaneMergesAndSplits ( int prevRightSimilarLaneIndex, int nextCompatibleLaneCount, int prevSimilarLaneCount, int &minNextRightSimilarLaneIndex, int &maxNextRightSimilarLaneIndex ) : void
PathFindThread ( ) : void
ProcessItem2 ( BufferItem item, ushort targetNodeId, bool targetDisabled, ushort nextSegmentId, NetSegment &nextSegment, uint lane, byte offset, byte connectOffset ) : void
ProcessItemCosts ( bool allowCustomLaneChanging, bool debug, BufferItem item, ushort targetNode, ushort segmentID, NetSegment &segment, int &laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian ) : bool
ProcessItemCosts ( bool allowCustomLaneChanging, bool debug, BufferItem item, ushort targetNodeId, ushort nextSegmentId, NetSegment &nextSegment, int &laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian, int forceLaneIndex, uint forceLaneId, bool &foundForced ) : bool
ProcessItemMain ( uint unitId, BufferItem item, ushort nextNodeId, NetNode &nextNode, byte connectOffset, bool isMiddle ) : void
ProcessItemPedBicycle ( BufferItem item, ushort targetNodeId, ushort segmentID, NetSegment &segment, byte connectOffset, int laneIndex, uint lane ) : void

Method Details

Awake() protected method

protected Awake ( ) : void
return void

CalculatePath() public method

public CalculatePath ( ExtVehicleType vehicleType, uint unit, bool skipQueue ) : bool
vehicleType ExtVehicleType
unit uint
skipQueue bool
return bool

CanLanesConnect() protected method

protected CanLanesConnect ( uint laneId1, uint laneId2 ) : bool
laneId1 uint
laneId2 uint
return bool

CanUseLane() protected method

protected CanUseLane ( bool debug, ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo ) : bool
debug bool
segmentId ushort
laneIndex uint
laneId uint
laneInfo NetInfo
return bool

GetLaneSpeedLimit() protected method

protected GetLaneSpeedLimit ( ushort segmentId, uint laneIndex, uint laneId, NetInfo lane ) : float
segmentId ushort
laneIndex uint
laneId uint
lane NetInfo
return float

IsLaneArrowChangerEnabled() protected method

protected IsLaneArrowChangerEnabled ( ) : bool
return bool

OnDestroy() protected method

protected OnDestroy ( ) : void
return void

PathFindImplementation() protected method

protected PathFindImplementation ( uint unit, PathUnit &data ) : void
unit uint
data PathUnit
return void

Property Details

IsMasterPathFind public_oe property

public bool IsMasterPathFind
return bool

SYNC_TIMEOUT public_oe static_oe property

public static int SYNC_TIMEOUT
return int

_failedPathFinds public_oe property

public uint _failedPathFinds
return uint

_succeededPathFinds public_oe property

public uint _succeededPathFinds
return uint