diff --git a/Assets/Prefabs/Astronaut.prefab b/Assets/Prefabs/Astronaut.prefab index 3dfd265..13038c3 100644 --- a/Assets/Prefabs/Astronaut.prefab +++ b/Assets/Prefabs/Astronaut.prefab @@ -61,6 +61,7 @@ GameObject: - 54: {fileID: 5462614} - 136: {fileID: 13672180} - 114: {fileID: 11491252} + - 82: {fileID: 8247410} m_Layer: 0 m_Name: Character m_TagString: Player @@ -134,6 +135,80 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 120 m_CollisionDetection: 0 +--- !u!82 &8247410 +AudioSource: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 170392} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: baf0f2aab6ecd0643a71917b93e90983, type: 3} + m_PlayOnAwake: 0 + m_Volume: 0.788 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 1 + BypassListenerEffects: 1 + BypassReverbZones: 1 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 --- !u!114 &11434752 MonoBehaviour: m_ObjectHideFlags: 1 diff --git a/Assets/Scripts/Asteroid.cs b/Assets/Scripts/Asteroid.cs index 38f4251..19328f6 100644 --- a/Assets/Scripts/Asteroid.cs +++ b/Assets/Scripts/Asteroid.cs @@ -82,7 +82,7 @@ public class Asteroid : MonoBehaviour AudioSource.PlayClipAtPoint(audio.clip, transform.position, audio.volume); var wait = new WaitForSeconds(emitter.GetComponent().duration); - Destroy(emitter); + //Destroy(emitter); //doesnt play if removed. } diff --git a/Assets/Scripts/AstronautAnimator.cs b/Assets/Scripts/AstronautAnimator.cs index 9fa421d..18a07b2 100644 --- a/Assets/Scripts/AstronautAnimator.cs +++ b/Assets/Scripts/AstronautAnimator.cs @@ -47,6 +47,9 @@ public class AstronautAnimator : MonoBehaviour { public void Eject() { StartCoroutine(Spin()); + var audio = aspi.GetComponent(); //eject sound + audio.bypassListenerEffects = true; + AudioSource.PlayClipAtPoint(audio.clip, transform.position, audio.volume); } IEnumerator Spin() diff --git a/Assets/_Scenes/Main.unity b/Assets/_Scenes/Main.unity index 84fae91..837a65a 100644 --- a/Assets/_Scenes/Main.unity +++ b/Assets/_Scenes/Main.unity @@ -132,6 +132,10 @@ Prefab: propertyPath: m_Name value: Astronaut_0 objectReference: {fileID: 0} + - target: {fileID: 21257324, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} m_IsPrefabParent: 0 @@ -475,6 +479,10 @@ Prefab: propertyPath: PlayerNumber value: 1 objectReference: {fileID: 0} + - target: {fileID: 21257324, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} m_IsPrefabParent: 0