Exemple #1
0
        public VehicleAudio(Vehicle vehicle)
        {
            _vehicle = vehicle;
            if (vehicle.Driver is CpuDriver)
            {
                return;
            }

            _engineSounds = new List <ISound>();
            foreach (int id in vehicle.Config.EngineSoundIds)
            {
                ISound sound = SoundCache.CreateInstance(id, true);
                if (sound != null)
                {
                    sound.MinimumDistance = 20;
                    sound.MaximumDistance = 100;
                    _engineSounds.Add(sound);
                }
            }
            if (_engineSounds.Count > 0)
            {
                _sound = _engineSounds[0];
            }
        }
Exemple #2
0
        public CopDriver()
            : base()

        {
            _siren = SoundCache.CreateInstance(SoundIds.CopSiren, true);
        }