mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge remote-tracking branch 'origin/zero-g-props' into zero-g-props
This commit is contained in:
commit
4b87735d4f
@ -45,6 +45,21 @@ public class AddPhysics : MonoBehaviour
|
|||||||
bodyGo.AddComponent<DynamicForceDetector>();
|
bodyGo.AddComponent<DynamicForceDetector>();
|
||||||
bodyGo.AddComponent<DynamicFluidDetector>();
|
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);
|
bodyGo.SetActive(true);
|
||||||
|
|
||||||
transform.parent = bodyGo.transform;
|
transform.parent = bodyGo.transform;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user