/// <summary>Is called when a virtual key is pressed.</summary> public void KeyDown(VirtualKeys key) { DVS.KeyDown(key); PanelManager.KeyDown(key, Panel); ATSSoundManager.PlayOnce(key); ATSSoundManager.PlayLoop(key); }
public void SetBrake(int brakeNotch) { if (DVS.ResetOnNotchMove) { DVS.ResetTimer(); } }
public void SetPower(int powerNotch) { if (DVS.ResetOnNotchMove) { DVS.ResetTimer(); } }
public void SetReverser(int reverser) { if (DVS.ResetOnNotchMove) { DVS.ResetTimer(); } }
/// <summary>Is called every frame.</summary> public void Elapse(ElapseData data) { if (data.PrecedingVehicle != null) { if (data.PrecedingVehicle.Distance < 0.2 && data.PrecedingVehicle.Distance > -1 && !crashed) { if (data.Vehicle.Speed.KilometersPerHour > CrashSpeed) { crashed = true; Panel[PanelManager.Crash] = 1; SoundManager.Play(ATSSoundManager.Crash, 1.0, 1.0, false); } } } Interlocker.update(data); SafetySystem.update(data); PanelManager.update(data, Panel); DVS.update(data); Misc.Update(data); Sound.Update(); }
public void HornBlow(HornTypes type) { if (DVS.ResetOnKlaxon == 4) { DVS.ResetTimer(); } else { if (type == HornTypes.Primary && DVS.ResetOnKlaxon == 1) { DVS.ResetTimer(); } if (type == HornTypes.Secondary && DVS.ResetOnKlaxon == 2) { DVS.ResetTimer(); } if (type == HornTypes.Music && DVS.ResetOnKlaxon == 3) { DVS.ResetTimer(); } } }