diff --git a/Assets/Scenes/Preparation.unity b/Assets/Scenes/Preparation.unity index 21140d0..ed1ba8e 100644 --- a/Assets/Scenes/Preparation.unity +++ b/Assets/Scenes/Preparation.unity @@ -5385,6 +5385,10 @@ PrefabInstance: propertyPath: oxygenTank value: objectReference: {fileID: 631903965} + - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} + propertyPath: audioSource + value: + objectReference: {fileID: 1248132680} - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} propertyPath: gogglesLeft value: @@ -5393,6 +5397,10 @@ PrefabInstance: propertyPath: rayDistance value: 3 objectReference: {fileID: 0} + - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} + propertyPath: suitUpSound + value: + objectReference: {fileID: 8300000, guid: f70a75c94fea2c340b66d80124933cca, type: 3} - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} propertyPath: gogglesRight value: @@ -5401,6 +5409,10 @@ PrefabInstance: propertyPath: equipmentCount value: objectReference: {fileID: 936678402} + - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} + propertyPath: itemPickupSound + value: + objectReference: {fileID: 8300000, guid: 33ab3ae446778ca4496be357482188a9, type: 3} - target: {fileID: 6724316082960878885, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} propertyPath: oxygenTankCharge value: @@ -5476,6 +5488,9 @@ PrefabInstance: insertIndex: -1 addedObject: {fileID: 2089898635} m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4459864850019384750, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} + insertIndex: -1 + addedObject: {fileID: 1248132680} - targetCorrespondingSourceObject: {fileID: 4459864851310106424, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} insertIndex: -1 addedObject: {fileID: 848670200} @@ -6918,6 +6933,107 @@ Transform: m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: 9a56e709a3a55f548bef2e021460eef8, type: 3} m_PrefabInstance: {fileID: 506929711} m_PrefabAsset: {fileID: 0} +--- !u!1 &1248132679 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4459864850019384750, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3} + m_PrefabInstance: {fileID: 848670198} + m_PrefabAsset: {fileID: 0} +--- !u!82 &1248132680 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1248132679} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!1001 &1259851975 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Raycast.cs b/Assets/Scripts/Raycast.cs index e0909a8..95c49bc 100644 --- a/Assets/Scripts/Raycast.cs +++ b/Assets/Scripts/Raycast.cs @@ -11,6 +11,10 @@ public class Raycast : MonoBehaviour public int itemCount; public int goalCount = 8; + public AudioSource audioSource; + public AudioClip itemPickupSound; + public AudioClip suitUpSound; + public Image head; public Image body; public Image oxygenTank; @@ -79,32 +83,40 @@ private void PickUpItem(Collider itemCollider) { case "oxygenTank": oxygenTank.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "body": body.color = Color.green; legL.color = Color.green; legR.color = Color.green; + audioSource.PlayOneShot(suitUpSound); break; case "goggles": gogglesLeft.color = Color.green; gogglesRight.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "feet": feetL.color = Color.green; feetR.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "weight": weightL.color = Color.green; weightR.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "oxygenTankCharge": oxygenTankCharge.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "breather": breather.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; case "knife": knifeUp.color = Color.green; + audioSource.PlayOneShot(itemPickupSound); break; default: Debug.Log("No matching tag found.");