TrainCrewInput Class

void TrainCrewInput.Init();
Call at startup.


void TrainCrewInput.SetNotch(int notch);
Enter the notch. You can call it only when it changes.
Enter a positive value for the force side and a negative value for the braking side.
int notch:Value corresponding to the notch
EB:-8
B6:-7
B1:-2
Holding braking:-1
N:0
P1:1
P5:5


void TrainCrewInput.SetReverser(int dir);

Enter the reverser. You can call it only when it changes.
int dir:Value corresponding to the reverser
1:Forward
0:Neutral
-1:Backward


void TrainCrewInput.SetButton(InputAction action, bool on);
Enter the status of a button or switch.



TrainState TrainCrewInput.GetTrainState();
Get the status of the operating train.



void TrainCrewInput.SetWiper(int state);
Set the wiper setting. It's okay to call only when changed.
int state: Value corresponding to the wiper setting
0: OFF
1: Intermittent
2: Low speed
3: High speed



void TrainCrewInput.RequestStaData();
Requests transmission of station information list.
*The station information list may be updated several frames later.




void TrainCrewInput.Dispose();
Call when finished.



GameState TrainCrewInput.gameState
Get the game state.

TrainState class

public float Speed; //Operating speed(km/h)
public bool AllClose; //Door closed
public float MR_Press; //Main air reservoir
public List<CarState> CarStates; //Information on each car

public Dictionary<PanelLamp, bool> Lamps; //Driver's cab indicator light status
public string ATS_Class; //Class indication of ATS indicator
public string ATS_Speed; //Speed indication of ATS indicator
public string ATS_State; //State indication of ATS indicator

//About diagram
public TimeSpan NowTime; //Current time
public string diaName; //Train number
public string Class; //Class
public string BoundFor; //destination
public List<Station> stationList; // Information for each station
public int nowStaIndex; // Index for the next station (used for stationList)

//About running
public float nextUIDistance; //Remaining distance displayed on the game UI
public float nextStaDistance; //Remaining distance to the next station
public string nextStaName; //Name of the next station
public string nextStopType; //Whether the next station is a stop or pass-through
public float speedLimit; //Current speed limit
public float nextSpeedLimit; //Next speed limit (will be "-1" if not displayed on the game UI)
public float nextSpeedLimitDistance; //Distance to the next speed limit (will be "-1" if not displayed on the game UI)
public float gradient; //Gradient (in ‰)
public int Pnotch; // Current throttle value
public int Bnotch; // Current brake value
public int Reverser; // Current reverser value


CarState class

public bool DoorClose; //Door closed
public float BC_Press; //Brake cylinder pressure
public float Ampare; //Electric current


Station Class

public string Name; // Station name
public string StopPosName; // Stop position name (station, platform, up/down)
public TimeSpan ArvTime; // Arrival time
public TimeSpan DepTime; // Departure time
public DoorDir doorDir; // Door opening direction
public StopType stopType; // Stopping or passing
public float TotalLength; // Distance from the starting position


enum InputAction

NotchUp, //Power
NotchDw, //Brake
NotchN, //Neutral(Instant)
NotchToN, //Neutral(Slow)
NotchEB, //Emergency brake
NotchB1, //Minimum Brake
GradientStart, //Gradient start switch
Buzzer, //Contact buzzer
HornAir, //Horn (air whistle)
HornEle, //Horn (electric whistle)
ViewChange, //Viewpoint switching
PauseMenu, //Pause menu
ViewDiagram, //Diagram display ON / OFF
ViewUserInterface, //User Interface ON/OFF
ViewHome, //Viewpoint reset
EBReset, //Reset EB device timer and alarm
DriverViewR, //View from the right side
DriverViewL, //View from the left side
DriverViewC //View from the driver's seat
LightLow, //High beam / Low beam (Headlamp)
DoorOpn, //Door switch "Open"
DoorCls, //Door switch "Close"
ReOpenSW, //Reopening door switch
JoukouSokusin, //Broadcast before closing the door
DoorKey, //Inserting or taking out the door switch key
Housou, //Play in-train broadcasts
ConductorViewB, //View from the back


GameState class

public GameScreen gameScreen; //Current game screen
public CrewType crewType; //driver or conductor
public DriveMode driveMode; //Current game mode


enum GameScreen

MainGame,
MainGame_Pause,
MainGame_Loading,
Menu,
Result,
Title,
Other,
NotRunningGame,


enum CrewType

Driver,
Conductor,


enum DriveMode

Normal,
Free,
RTA,