C# 클래스 OpenBve.Scripting.Train

Provides scripting access to trains internal variables
파일 보기 프로젝트 열기: leezer3/OpenBVE

공개 메소드들

메소드 설명
acceleration ( TrainManager Train, int CarIndex ) : double

Returns the acceleration of the selected car

accelerationMotor ( TrainManager Train ) : double

Returns the acceleration that the first motor car is currently generating in m/s

accelerationMotor ( TrainManager Train, int CarIndex ) : double

Returns the acceleration that the selected car's motor is currently generating in m/s

brakeCylinder ( TrainManager Train, int CarIndex ) : double

Returns the brake cylinder pressure of the selected car of the selected train

brakeNotch ( TrainManager Train ) : int

Returns the driver's selected brake notch for the selected train

brakeNotchLinear ( TrainManager Train ) : int

Returns the driver's selected brake notch (Including EB) for the selected train

brakeNotches ( TrainManager Train ) : int

Returns the maximum brake notch for the selected train

brakeNotchesLinear ( TrainManager Train ) : int

Returns the maximum possible brake notch (Including EB) for the selected train

brakePipe ( TrainManager Train, int CarIndex ) : double

Returns the brake pipe pressure of the selected car of the selected train

constantSpeed ( TrainManager Train ) : bool

Whether the constant speed devicee is currently active for the selected train

distance ( TrainManager Train, Vector3 Position ) : double

Returns the cartesian distance to the nearest car of the selected train

distance ( TrainManager Train, int CarIndex, Vector3 Position ) : double

Returns the cartesian distance to the selected car of the selected train

doors ( TrainManager Train ) : double

Returns the doors state of the selected train

doors ( TrainManager Train, int CarIndex ) : double

Returns the doors state of the selected car of the selected train

emergencyBrake ( TrainManager Train ) : bool

Returns whether EB is active for the selected train

hasAirBrake ( TrainManager Train ) : bool

Whether the selected train has an automatic air brake

hasConstantSpeed ( TrainManager Train ) : bool

Whether the selected train has a constant speed device

hasHoldBrake ( TrainManager Train ) : bool

Whether the selected train has a hold brake

hasPlugin ( TrainManager Train ) : bool

Whether the selected train uses a custom plugin

holdBrake ( TrainManager Train ) : bool

Whether the hold brake is currently active for the selected train

leftDoors ( TrainManager Train ) : double

Returns the left-hand doors state of the selected train

leftDoors ( TrainManager Train, int CarIndex ) : double

Returns the left-hand doors state of the selected car of the selected train

leftDoorsTarget ( TrainManager Train ) : bool

Returns whether the left doors are opening for the selected train

leftDoorsTarget ( TrainManager Train, int CarIndex ) : bool

Returns whether the left doors are opening for the selected car of the selected train

mainReservoir ( TrainManager Train, int CarIndex ) : double

Returns the main brake reservoir pressure of the selected car of the selected train

numberOfCars ( TrainManager Train ) : int

Returns the number of cars in this train

pluginState ( TrainManager Train, int pluginState ) : int

Whether the selected train has a hold brake

powerNotch ( TrainManager Train ) : int

Returns the driver's selected power notch for the selected train

powerNotches ( TrainManager Train ) : int

Returns the maximum power notch for the selected train

reverserNotch ( TrainManager Train ) : int

Returns the driver's selected reverser position for the selected train

rightDoors ( TrainManager Train ) : double

Returns the left-hand doors state of the selected train

rightDoors ( TrainManager Train, int CarIndex ) : double

Returns the left-hand doors state of the selected car of the selected train

rightDoorsTarget ( TrainManager Train ) : bool

Returns whether the left doors are opening for the selected train

rightDoorsTarget ( TrainManager Train, int CarIndex ) : bool

Returns whether the left doors are opening for the selected car of the selected train

speed ( TrainManager Train, int CarIndex ) : double

Returns the speed of the selected car

speedometer ( TrainManager Train, int CarIndex ) : double

Returns the speed of the selected car, accounting for wheelslip and wheel lock

straightAirPipe ( TrainManager Train, int CarIndex ) : double

Returns the brake pipe pressure of the selected car of the selected train

trackDistance ( TrainManager Train, double TrackPosition ) : double

Returns the track distance to the nearest car of the selected train

trackDistance ( TrainManager Train, int CarIndex, double TrackPosition ) : double

Returns the track distance to the nearest car of the selected train

메소드 상세

acceleration() 공개 정적인 메소드

Returns the acceleration of the selected car
public static acceleration ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The car for which to get the acceleration
리턴 double

accelerationMotor() 공개 정적인 메소드

Returns the acceleration that the first motor car is currently generating in m/s
public static accelerationMotor ( TrainManager Train ) : double
Train TrainManager The selected train
리턴 double

accelerationMotor() 공개 정적인 메소드

Returns the acceleration that the selected car's motor is currently generating in m/s
public static accelerationMotor ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

brakeCylinder() 공개 정적인 메소드

Returns the brake cylinder pressure of the selected car of the selected train
public static brakeCylinder ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

brakeNotch() 공개 정적인 메소드

Returns the driver's selected brake notch for the selected train
public static brakeNotch ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

brakeNotchLinear() 공개 정적인 메소드

Returns the driver's selected brake notch (Including EB) for the selected train
public static brakeNotchLinear ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

brakeNotches() 공개 정적인 메소드

Returns the maximum brake notch for the selected train
public static brakeNotches ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

brakeNotchesLinear() 공개 정적인 메소드

Returns the maximum possible brake notch (Including EB) for the selected train
public static brakeNotchesLinear ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

brakePipe() 공개 정적인 메소드

Returns the brake pipe pressure of the selected car of the selected train
public static brakePipe ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

constantSpeed() 공개 정적인 메소드

Whether the constant speed devicee is currently active for the selected train
public static constantSpeed ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

distance() 공개 정적인 메소드

Returns the cartesian distance to the nearest car of the selected train
public static distance ( TrainManager Train, Vector3 Position ) : double
Train TrainManager The selected train
Position Vector3 The object's absolute in-game position
리턴 double

distance() 공개 정적인 메소드

Returns the cartesian distance to the selected car of the selected train
public static distance ( TrainManager Train, int CarIndex, Vector3 Position ) : double
Train TrainManager The selected train
CarIndex int The selected car
Position Vector3 The object's absolute in-game position
리턴 double

doors() 공개 정적인 메소드

Returns the doors state of the selected train
public static doors ( TrainManager Train ) : double
Train TrainManager The selected train
리턴 double

doors() 공개 정적인 메소드

Returns the doors state of the selected car of the selected train
public static doors ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

emergencyBrake() 공개 정적인 메소드

Returns whether EB is active for the selected train
public static emergencyBrake ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

hasAirBrake() 공개 정적인 메소드

Whether the selected train has an automatic air brake
public static hasAirBrake ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

hasConstantSpeed() 공개 정적인 메소드

Whether the selected train has a constant speed device
public static hasConstantSpeed ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

hasHoldBrake() 공개 정적인 메소드

Whether the selected train has a hold brake
public static hasHoldBrake ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

hasPlugin() 공개 정적인 메소드

Whether the selected train uses a custom plugin
public static hasPlugin ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

holdBrake() 공개 정적인 메소드

Whether the hold brake is currently active for the selected train
public static holdBrake ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

leftDoors() 공개 정적인 메소드

Returns the left-hand doors state of the selected train
public static leftDoors ( TrainManager Train ) : double
Train TrainManager The selected train
리턴 double

leftDoors() 공개 정적인 메소드

Returns the left-hand doors state of the selected car of the selected train
public static leftDoors ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

leftDoorsTarget() 공개 정적인 메소드

Returns whether the left doors are opening for the selected train
public static leftDoorsTarget ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

leftDoorsTarget() 공개 정적인 메소드

Returns whether the left doors are opening for the selected car of the selected train
public static leftDoorsTarget ( TrainManager Train, int CarIndex ) : bool
Train TrainManager The selected train
CarIndex int The selected car
리턴 bool

mainReservoir() 공개 정적인 메소드

Returns the main brake reservoir pressure of the selected car of the selected train
public static mainReservoir ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

numberOfCars() 공개 정적인 메소드

Returns the number of cars in this train
public static numberOfCars ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

pluginState() 공개 정적인 메소드

Whether the selected train has a hold brake
public static pluginState ( TrainManager Train, int pluginState ) : int
Train TrainManager The selected train
pluginState int The plugin state to query
리턴 int

powerNotch() 공개 정적인 메소드

Returns the driver's selected power notch for the selected train
public static powerNotch ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

powerNotches() 공개 정적인 메소드

Returns the maximum power notch for the selected train
public static powerNotches ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

reverserNotch() 공개 정적인 메소드

Returns the driver's selected reverser position for the selected train
public static reverserNotch ( TrainManager Train ) : int
Train TrainManager The selected train
리턴 int

rightDoors() 공개 정적인 메소드

Returns the left-hand doors state of the selected train
public static rightDoors ( TrainManager Train ) : double
Train TrainManager The selected train
리턴 double

rightDoors() 공개 정적인 메소드

Returns the left-hand doors state of the selected car of the selected train
public static rightDoors ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

rightDoorsTarget() 공개 정적인 메소드

Returns whether the left doors are opening for the selected train
public static rightDoorsTarget ( TrainManager Train ) : bool
Train TrainManager The selected train
리턴 bool

rightDoorsTarget() 공개 정적인 메소드

Returns whether the left doors are opening for the selected car of the selected train
public static rightDoorsTarget ( TrainManager Train, int CarIndex ) : bool
Train TrainManager The selected train
CarIndex int The selected car
리턴 bool

speed() 공개 정적인 메소드

Returns the speed of the selected car
public static speed ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The car for which to get the speed
리턴 double

speedometer() 공개 정적인 메소드

Returns the speed of the selected car, accounting for wheelslip and wheel lock
public static speedometer ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The car for which to get the speed
리턴 double

straightAirPipe() 공개 정적인 메소드

Returns the brake pipe pressure of the selected car of the selected train
public static straightAirPipe ( TrainManager Train, int CarIndex ) : double
Train TrainManager The selected train
CarIndex int The selected car
리턴 double

trackDistance() 공개 정적인 메소드

Returns the track distance to the nearest car of the selected train
public static trackDistance ( TrainManager Train, double TrackPosition ) : double
Train TrainManager The selected train
TrackPosition double The object's track position
리턴 double

trackDistance() 공개 정적인 메소드

Returns the track distance to the nearest car of the selected train
public static trackDistance ( TrainManager Train, int CarIndex, double TrackPosition ) : double
Train TrainManager The selected train
CarIndex int The selected car
TrackPosition double The object's track position
리턴 double