Open Rails

LevelCrossings.CreateLevelCrossing Method

[This is preliminary documentation and subject to change.]

Creates a level crossing from its track and road component IDs.

public LevelCrossing CreateLevelCrossing(
   WorldPosition position,
   IEnumerable<inttrackIDs,
   IEnumerable<introadIDs,
   float warningTime,
   float minimumDistance
);

Parameters

position
Position of the level crossing object for error reporting.
trackIDs
List of TrItem IDs (from the track database) for the track crossing items.
roadIDs
List of TrItem IDs (from the road database) for the road crossing items.
warningTime
Time that gates should be closed prior to a train arriving (seconds).
minimumDistance
Minimum distance from the gates that a train is allowed to stop and have the gates open (meters).

Return Value

The level crossing object comprising of the specified track and road items plus warning and distance configuration.

See Also

LevelCrossings Class | ORTS Namespace