C# Class TrafficManager.CustomAI.CustomCarAI

Inheritance: CarAI
Datei anzeigen Open project: seiggy/Skylines-Traffic-Manager

Public Methods

Method Description
TmCalculateSegmentPosition ( ushort vehicleId, Vehicle &vehicleData, PathUnit nextPosition, PathUnit position, uint laneId, byte offset, PathUnit prevPos, uint prevLaneId, byte prevOffset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
TmCalculateSegmentPositionPathFinder ( ushort vehicleId, Vehicle &vehicleData, PathUnit position, uint laneId, byte offset, Vector3 &pos, Vector3 &dir, float &maxSpeed ) : void
TrafficManagerSimulationStep ( ushort vehicleId, Vehicle &vehicleData, Vector3 physicsLodRefPos ) : void

Protected Methods

Method Description
StartPathFind ( ushort vehicleId, Vehicle &vehicleData, Vector3 startPos, Vector3 endPos, bool startBothWays, bool endBothWays ) : bool

Private Methods

Method Description
CalculateLod ( Vector3 physicsLodRefPos, Vector3 lastFramePosition ) : int
CalculateMaxBlockingVehicleCount ( ) : int
CanFindPath ( ushort vehicleId, Vehicle &data ) : bool
DespawnInvalidVehicles ( ushort vehicleId, Vehicle vehicleData ) : void
DespawnVehicleIfOverBlockMax ( ushort vehicleId, Vehicle vehicleData ) : void
DespawnVehicles ( ushort vehicleId, Vehicle vehicleData ) : void
FindPathIfNeeded ( ushort vehicleId, Vehicle &vehicleData ) : void
SimulateTrailingVehicles ( ushort vehicleId, Vehicle &vehicleData, int lodPhysics, ushort leadingVehicleId, VehicleManager vehicleManager, int numberOfIterations ) : void
SimulateVehicleChain ( ushort vehicleId, Vehicle &vehicleData, Vector3 physicsLodRefPos ) : void
SpawnVehicleIfWaiting ( ushort vehicleId, Vehicle &vehicleData ) : void

Method Details

StartPathFind() protected method

protected StartPathFind ( ushort vehicleId, Vehicle &vehicleData, Vector3 startPos, Vector3 endPos, bool startBothWays, bool endBothWays ) : bool
vehicleId ushort
vehicleData Vehicle
startPos Vector3
endPos Vector3
startBothWays bool
endBothWays bool
return bool

TmCalculateSegmentPosition() public method

public TmCalculateSegmentPosition ( ushort vehicleId, Vehicle &vehicleData, PathUnit nextPosition, PathUnit position, uint laneId, byte offset, PathUnit prevPos, uint prevLaneId, byte prevOffset, 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
pos Vector3
dir Vector3
maxSpeed float
return void

TmCalculateSegmentPositionPathFinder() public method

public TmCalculateSegmentPositionPathFinder ( 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

TrafficManagerSimulationStep() public method

public TrafficManagerSimulationStep ( ushort vehicleId, Vehicle &vehicleData, Vector3 physicsLodRefPos ) : void
vehicleId ushort
vehicleData Vehicle
physicsLodRefPos Vector3
return void