示例#1
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();
        }
示例#2
0
 /// <summary>Is called when a virtual key is released.</summary>
 public void KeyUp(VirtualKeys key)
 {
     PanelManager.KeyUp(key, Panel);
 }