Feature: Loud metal pipe noise to indicate damage taken

This commit is contained in:
Arlo Filley 2024-04-30 17:31:29 +01:00
parent 4e9e988034
commit 694b5f9d8c
6 changed files with 34 additions and 0 deletions

BIN
Assets/Metal-Pipe.mp3 Normal file

Binary file not shown.

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 2f2aa64d405e14e95aee0dd410072bf6
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Models.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6ebfe03beb50948f4a91cf3dad5f9cab
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -19,6 +19,9 @@ public class PlayerController : MonoBehaviour
public Vector3 moveDirection;
public Rigidbody rb;
[Header("Audio")]
public AudioSource metalPipe;
void Start()
{
@ -47,6 +50,7 @@ public class PlayerController : MonoBehaviour
if (collision.gameObject.name == "Enemy")
{
Debug.Log("OWIE");
metalPipe.Play();
}
}
}