mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
add back impact audio
This commit is contained in:
parent
7c89be3425
commit
41312db32d
@ -45,6 +45,21 @@ public class AddPhysics : MonoBehaviour
|
||||
bodyGo.AddComponent<DynamicForceDetector>();
|
||||
bodyGo.AddComponent<DynamicFluidDetector>();
|
||||
|
||||
var impactSensor = bodyGo.AddComponent<ImpactSensor>();
|
||||
var audioSource = bodyGo.AddComponent<AudioSource>();
|
||||
audioSource.maxDistance = 30;
|
||||
audioSource.dopplerLevel = 0;
|
||||
audioSource.rolloffMode = AudioRolloffMode.Custom;
|
||||
audioSource.playOnAwake = false;
|
||||
audioSource.spatialBlend = 1;
|
||||
var owAudioSource = bodyGo.AddComponent<OWAudioSource>();
|
||||
owAudioSource._audioSource = audioSource;
|
||||
owAudioSource._track = OWAudioMixer.TrackName.Environment;
|
||||
var objectImpactAudio = bodyGo.AddComponent<ObjectImpactAudio>();
|
||||
objectImpactAudio._minPitch = 0.4f;
|
||||
objectImpactAudio._maxPitch = 0.6f;
|
||||
objectImpactAudio._impactSensor = impactSensor;
|
||||
|
||||
bodyGo.SetActive(true);
|
||||
|
||||
transform.parent = bodyGo.transform;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user