Пример #1
0
 /// <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);
 }
Пример #2
0
 public void SetBrake(int brakeNotch)
 {
     if (DVS.ResetOnNotchMove)
     {
         DVS.ResetTimer();
     }
 }
Пример #3
0
 public void SetPower(int powerNotch)
 {
     if (DVS.ResetOnNotchMove)
     {
         DVS.ResetTimer();
     }
 }
Пример #4
0
 public void SetReverser(int reverser)
 {
     if (DVS.ResetOnNotchMove)
     {
         DVS.ResetTimer();
     }
 }
Пример #5
0
        /// <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();
        }
Пример #6
0
 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();
         }
     }
 }