Skip to content

Commit

Permalink
feat: enter water sfx
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoneerC committed Sep 24, 2024
1 parent 9c94c68 commit 52f79c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Assets/Scenes/Reparation.unity
Original file line number Diff line number Diff line change
Expand Up @@ -13234,6 +13234,10 @@ PrefabInstance:
propertyPath: oxygenWarning3
value:
objectReference: {fileID: 8300000, guid: 7ed3c99bc63172e4180096d90f099246, type: 3}
- target: {fileID: 1285577524151521393, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
propertyPath: enterWaterSound
value:
objectReference: {fileID: 8300000, guid: 335961129c6c5454a8de1c786544d148, type: 3}
- target: {fileID: 1285577524151521393, guid: 6bacecc4f3df9584198879c73a6b6c36, type: 3}
propertyPath: playerRigidbody
value:
Expand Down Expand Up @@ -18620,7 +18624,7 @@ MonoBehaviour:
welderPrefab: {fileID: 1071434719}
rayDistance: 100
playerCamera: {fileID: 0}
_welderInHand: 0
welderInHand: 0
--- !u!4 &1130256303 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -5819118886272102141, guid: e0f672a015f8fee418afd70dfd718f0d, type: 3}
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/WaterLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class WaterLogic : MonoBehaviour
public AudioClip oxygenWarning3;
public Image blackFadeImage;
public TextMeshProUGUI oxygenWarningText;
public AudioClip enterWaterSound;

private AudioSource _audioSource;
private Coroutine _oxygenDecrementCoroutine;
Expand Down Expand Up @@ -222,6 +223,7 @@ private void EnterWater()
Physics.gravity *= waterGravityScale;
playerRigidbody.drag = 3f;
_audioSource.PlayOneShot(underwaterAmbience);
_audioSource.PlayOneShot(enterWaterSound);

_audioSource.clip = underwaterBreathing;
_audioSource.loop = true;
Expand Down
Binary file added Assets/Sounds/Environment/splash.mp3
Binary file not shown.
Binary file not shown.

0 comments on commit 52f79c7

Please sign in to comment.