public TileAmbientSoundProvider( AmbientSoundPreset daySoundPreset, AmbientSoundPreset nightSoundPreset = null) { // prepare tile sounds presets var ambientSoundPresetDay = daySoundPreset ?? new AmbientSoundPreset(SoundResource.NoSound); var ambientSoundPresetNight = nightSoundPreset ?? ambientSoundPresetDay; this.ambientSoundPresetsDay = new[] { ambientSoundPresetDay }; this.ambientSoundPresetsNight = new[] { ambientSoundPresetNight }; }
public TileForestAmbientSoundProvider( AmbientSoundPreset daySoundPresetPlains, AmbientSoundPreset daySoundPresetForest, AmbientSoundPreset nightSoundPresetPlains, AmbientSoundPreset nightSoundPresetForest) : base(daySoundPresetPlains, nightSoundPresetPlains) { Api.Assert(daySoundPresetPlains is not null, $"{nameof(daySoundPresetPlains)} cannot be null"); Api.Assert(daySoundPresetForest is not null, $"{nameof(daySoundPresetForest)} cannot be null"); Api.Assert(nightSoundPresetPlains is not null, $"{nameof(nightSoundPresetPlains)} cannot be null"); Api.Assert(nightSoundPresetForest is not null, $"{nameof(nightSoundPresetForest)} cannot be null"); // combine sound presets for case when there are trees or bushes nearby this.AmbientSoundPresetsDayWithTrees = new[] { daySoundPresetPlains, daySoundPresetForest }; this.AmbientSoundPresetsNightWithTrees = new[] { nightSoundPresetPlains, nightSoundPresetForest }; }
public AmbientSoundPresetByDistance(AmbientSoundPreset ambientSoundPreset, double distanceSqr) { this.AmbientSoundPreset = ambientSoundPreset; this.DistanceSqr = distanceSqr; }