C# Class TrafficManager.Custom.AI.CustomVehicleAI

Inheritance: VehicleAI
Datei anzeigen Open project: Katalyst6/CSL.TransitAddonMod Class Usage Examples

Public Methods

Method Description
CustomCalculateSegmentPosition ( ushort vehicleID, Vehicle &vehicleData, PathUnit nextPosition, PathUnit position, uint laneID, byte offset, PathUnit prevPos, uint prevLaneID, byte prevOffset, int index, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
CustomCalculateSegmentPositionPathFinder ( ushort vehicleID, Vehicle &vehicleData, PathUnit position, uint laneID, byte offset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void

Protected Methods

Method Description
CalculateSegPos ( ushort vehicleID, Vehicle &vehicleData, PathUnit position, uint laneID, byte offset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void

Private Methods

Method Description
DetermineVehicleTypeFromAIType ( VehicleAI ai, bool emergencyOnDuty ) : ExtVehicleType?
DetermineVehicleTypeFromVehicle ( ushort vehicleId, Vehicle &vehicleData ) : ExtVehicleType?
DetermineVehicleTypeFromVehicleInfo ( VehicleInfo vehicleInfo ) : ExtVehicleType?
HandleVehicle ( ushort vehicleId, Vehicle &vehicleData, bool addTraffic, bool realTraffic ) : void
HandleVehicle ( ushort vehicleId, Vehicle &vehicleData, bool addTraffic, bool realTraffic, byte maxUpcomingPathPositions, bool debug = false ) : void

Handles vehicle path information in order to manage special nodes (nodes with priority signs or traffic lights). Data like "vehicle X is on segment S0 and is going to segment S1" is collected.

Method Details

CalculateSegPos() protected method

protected CalculateSegPos ( ushort vehicleID, Vehicle &vehicleData, PathUnit position, uint laneID, byte offset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
vehicleID ushort
vehicleData Vehicle
position PathUnit
laneID uint
offset byte
pos Vector3
dir Vector3
maxSpeed float
return void

CustomCalculateSegmentPosition() public method

public CustomCalculateSegmentPosition ( ushort vehicleID, Vehicle &vehicleData, PathUnit nextPosition, PathUnit position, uint laneID, byte offset, PathUnit prevPos, uint prevLaneID, byte prevOffset, int index, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
vehicleID ushort
vehicleData Vehicle
nextPosition PathUnit
position PathUnit
laneID uint
offset byte
prevPos PathUnit
prevLaneID uint
prevOffset byte
index int
pos Vector3
dir Vector3
maxSpeed float
return void

CustomCalculateSegmentPositionPathFinder() public method

public CustomCalculateSegmentPositionPathFinder ( ushort vehicleID, Vehicle &vehicleData, PathUnit position, uint laneID, byte offset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
vehicleID ushort
vehicleData Vehicle
position PathUnit
laneID uint
offset byte
pos Vector3
dir Vector3
maxSpeed float
return void