Property | Type | Description | |
---|---|---|---|
PrioritySegments | TrafficSegment[] | ||
markedVehicles | HashSet |
||
maxStopVelocity | float |
Method | Description | |
---|---|---|
AddPrioritySegment ( ushort nodeId, ushort segmentId, |
||
GetPrioritySegment ( ushort nodeId, ushort segmentId ) : SegmentEnd | ||
GetPrioritySegmentIds ( ushort nodeId ) : List |
||
GetSegmentDir ( int segment, ushort nodeid ) : Vector3 | ||
GetVehiclePosition ( ushort vehicleId ) : VehiclePosition | ||
HasIncomingVehiclesWithHigherPriority ( ushort targetVehicleId, ushort nodeId ) : bool | ||
IsLaneOrderConflictFree ( ushort segmentId, uint leftLaneIndex, uint rightLaneIndex ) : bool | ||
IsLeftHandDrive ( ) : bool |
Determines if the map uses a left-hand traffic system
|
|
IsLeftSegment ( ushort fromSegment, ushort toSegment, ushort nodeid ) : bool | ||
IsPriorityNode ( ushort nodeId ) : bool | ||
IsPrioritySegment ( ushort nodeId, ushort segmentId ) : bool | ||
IsRightSegment ( ushort fromSegment, ushort toSegment, ushort nodeid ) : bool | ||
RemovePrioritySegments ( ushort nodeId ) : void | ||
TrafficLightSimulationStep ( ) : void | ||
getPriorityNodes ( ) : HashSet |
||
nodeHousekeeping ( ushort nodeId ) : void | ||
segmentHousekeeping ( ushort segmentId ) : void |
Method | Description | |
---|---|---|
HasVehiclePriority ( bool debug, ushort targetCarId, bool targetIsOnMainRoad, ushort incomingCarId, bool incomingIsOnMainRoad, ushort nodeId ) : bool |
Method | Description | |
---|---|---|
AddPriorityNode ( ushort nodeId ) : byte |
Adds/Sets a node as a priority node
|
|
AddVehicle ( ushort vehicleId, |
||
ClearTraffic ( ) : void | ||
HandleAllVehicles ( ) : void | ||
InvertLeftRight ( Direction dir ) : Direction | ||
MarkVehicleInSegment ( ushort vehicleId, ushort segmentId ) : void | ||
OnLevelLoading ( ) : void | ||
OnLevelUnloading ( ) : void | ||
RemovePrioritySegment ( ushort nodeId, ushort segmentId ) : void | ||
RemoveVehicleFromSegments ( ushort vehicleId ) : void | ||
RequestClearTraffic ( ) : void | ||
TrafficPriority ( ) : System | ||
UnmarkVehicleInSegment ( ushort vehicleId, ushort segmentId ) : void | ||
fixJunctions ( ) : void | ||
isValidPriorityNode ( ushort nodeId, NodeValidityState &nodeState ) : bool | ||
rebuildPriorityNodes ( ) : void |
rebuilds the implicitly defined set of priority nodes (traffic light nodes & nodes with priority signs)
|
public static AddPrioritySegment ( ushort nodeId, ushort segmentId, |
||
nodeId | ushort | |
segmentId | ushort | |
type | ||
return | void |
public static GetPrioritySegment ( ushort nodeId, ushort segmentId ) : SegmentEnd | ||
nodeId | ushort | |
segmentId | ushort | |
return | SegmentEnd |
public static GetPrioritySegmentIds ( ushort nodeId ) : List |
||
nodeId | ushort | |
return | List |
public static GetSegmentDir ( int segment, ushort nodeid ) : Vector3 | ||
segment | int | |
nodeid | ushort | |
return | Vector3 |
public static GetVehiclePosition ( ushort vehicleId ) : VehiclePosition | ||
vehicleId | ushort | |
return | VehiclePosition |
public static HasIncomingVehiclesWithHigherPriority ( ushort targetVehicleId, ushort nodeId ) : bool | ||
targetVehicleId | ushort | |
nodeId | ushort | |
return | bool |
protected static HasVehiclePriority ( bool debug, ushort targetCarId, bool targetIsOnMainRoad, ushort incomingCarId, bool incomingIsOnMainRoad, ushort nodeId ) : bool | ||
debug | bool | |
targetCarId | ushort | |
targetIsOnMainRoad | bool | |
incomingCarId | ushort | |
incomingIsOnMainRoad | bool | |
nodeId | ushort | |
return | bool |
public static IsLaneOrderConflictFree ( ushort segmentId, uint leftLaneIndex, uint rightLaneIndex ) : bool | ||
segmentId | ushort | |
leftLaneIndex | uint | |
rightLaneIndex | uint | |
return | bool |
public static IsLeftSegment ( ushort fromSegment, ushort toSegment, ushort nodeid ) : bool | ||
fromSegment | ushort | |
toSegment | ushort | |
nodeid | ushort | |
return | bool |
public static IsPriorityNode ( ushort nodeId ) : bool | ||
nodeId | ushort | |
return | bool |
public static IsPrioritySegment ( ushort nodeId, ushort segmentId ) : bool | ||
nodeId | ushort | |
segmentId | ushort | |
return | bool |
public static IsRightSegment ( ushort fromSegment, ushort toSegment, ushort nodeid ) : bool | ||
fromSegment | ushort | |
toSegment | ushort | |
nodeid | ushort | |
return | bool |
public static RemovePrioritySegments ( ushort nodeId ) : void | ||
nodeId | ushort | |
return | void |
public static TrafficLightSimulationStep ( ) : void | ||
return | void |
public static nodeHousekeeping ( ushort nodeId ) : void | ||
nodeId | ushort | |
return | void |
public static segmentHousekeeping ( ushort segmentId ) : void | ||
segmentId | ushort | |
return | void |
public static TrafficSegment[] PrioritySegments | ||
return | TrafficSegment[] |