示例#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();
         }
     }
 }