From 180918b98f40d7979bcec14076e39d01bdd4414e Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 30 Jan 2022 18:00:20 +1100 Subject: [PATCH] Added audio --- ...t_Game_Deep_Dark_Dungeon_Ambience_Loop.wav | 3 ++ ...e_Deep_Dark_Dungeon_Ambience_Loop.wav.meta | 7 ++++ .../Sound/SFX/Postive_Game_Sound.wav | 3 ++ .../Sound/SFX/Postive_Game_Sound.wav.meta | 36 +++++++++++++++++++ Assets/Art Assets/Sound/SFX/Spikes.wav | 3 ++ Assets/Art Assets/Sound/SFX/Spikes.wav.meta | 36 +++++++++++++++++++ Assets/Art Assets/Sound/SFX/Subtle_Jump.wav | 3 ++ .../Art Assets/Sound/SFX/Subtle_Jump.wav.meta | 36 +++++++++++++++++++ Assets/Scenes/Official Levels/Level 1.unity | 4 +-- Assets/Scenes/Official Levels/Level 2.unity | 4 +-- Assets/Scenes/Official Levels/Level 3.unity | 4 +-- .../Character/CharacterInputController.cs | 22 ++++++++++-- 12 files changed, 152 insertions(+), 9 deletions(-) create mode 100644 Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav create mode 100644 Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta create mode 100644 Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav create mode 100644 Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta create mode 100644 Assets/Art Assets/Sound/SFX/Spikes.wav create mode 100644 Assets/Art Assets/Sound/SFX/Spikes.wav.meta create mode 100644 Assets/Art Assets/Sound/SFX/Subtle_Jump.wav create mode 100644 Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta diff --git a/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav b/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav new file mode 100644 index 0000000..1ba424d --- /dev/null +++ b/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1114e8a743d790c11233a122c2ea9b1ce2c463dd816aa4592758c2fbeec82e8 +size 18853784 diff --git a/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta b/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta new file mode 100644 index 0000000..5f7c656 --- /dev/null +++ b/Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 26b05661b72f11741a80e5126f2256f2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav b/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav new file mode 100644 index 0000000..0f8b734 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e29e135e335aa626dcf3f3dd804a7848987486c5bfa6aebbf7256d748ce87b9a +size 263522 diff --git a/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta b/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta new file mode 100644 index 0000000..16a1052 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: 25300bf305e2f6e49a92b4a22d34ad6b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 0 + quality: 1 + conversionMode: 0 + platformSettingOverrides: + 4: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 3 + quality: 1 + conversionMode: 0 + 7: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art Assets/Sound/SFX/Spikes.wav b/Assets/Art Assets/Sound/SFX/Spikes.wav new file mode 100644 index 0000000..b8d3d01 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Spikes.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50671c6b1429be59a0344e11eaed82f267cf8ffb877c3d9dbde899d8952a4fcf +size 353536 diff --git a/Assets/Art Assets/Sound/SFX/Spikes.wav.meta b/Assets/Art Assets/Sound/SFX/Spikes.wav.meta new file mode 100644 index 0000000..678e5d1 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Spikes.wav.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: 3342524d5a4ccda4283d0a1afdaf6307 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 0 + quality: 1 + conversionMode: 0 + platformSettingOverrides: + 4: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 3 + quality: 1 + conversionMode: 0 + 7: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav b/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav new file mode 100644 index 0000000..5133213 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a88217cad562b5b463349dd78a2d8850743c285eb9652a070170e0e2524b2a9 +size 177602 diff --git a/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta b/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta new file mode 100644 index 0000000..3376970 --- /dev/null +++ b/Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta @@ -0,0 +1,36 @@ +fileFormatVersion: 2 +guid: f299cdaedee0d3945af92005e838736c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 0 + quality: 1 + conversionMode: 0 + platformSettingOverrides: + 4: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 3 + quality: 1 + conversionMode: 0 + 7: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Official Levels/Level 1.unity b/Assets/Scenes/Official Levels/Level 1.unity index a75a365..dc27739 100644 --- a/Assets/Scenes/Official Levels/Level 1.unity +++ b/Assets/Scenes/Official Levels/Level 1.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48909cfdfdff4b6287c7302b6941ef885d2326cc8afa0d8b890c102a66d84f45 -size 173901 +oid sha256:81aa53e1624b2408f88f8edbe5d834a6ed6311b1e9ccf603dc9843d9c320e8fb +size 176902 diff --git a/Assets/Scenes/Official Levels/Level 2.unity b/Assets/Scenes/Official Levels/Level 2.unity index afe8439..2ed3fac 100644 --- a/Assets/Scenes/Official Levels/Level 2.unity +++ b/Assets/Scenes/Official Levels/Level 2.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8976e7bfaaf8b7db16471f90c4986d8365df7fefdae13f6440d76acff1834550 -size 1961573 +oid sha256:9739cb4b3169bc4331871638b6170517bc9831566074395a464dab4b9ba99209 +size 1964746 diff --git a/Assets/Scenes/Official Levels/Level 3.unity b/Assets/Scenes/Official Levels/Level 3.unity index 53a0964..dc8063e 100644 --- a/Assets/Scenes/Official Levels/Level 3.unity +++ b/Assets/Scenes/Official Levels/Level 3.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:02fc32aa23106e7ee4bae91009a0f0c3fe5841fc51753debff2aaf370151972d -size 591133 +oid sha256:9702cf532ec8bd87c68943206a88fef9afb2873652bd16d9ecd1e7b8093bd09e +size 594251 diff --git a/Assets/Scripts/Character/CharacterInputController.cs b/Assets/Scripts/Character/CharacterInputController.cs index 941e320..164356f 100644 --- a/Assets/Scripts/Character/CharacterInputController.cs +++ b/Assets/Scripts/Character/CharacterInputController.cs @@ -26,6 +26,15 @@ public class CharacterInputController : MonoBehaviour [SerializeField] private Animator m_animator; + [SerializeField] + private AudioClip m_DeathSound; + + [SerializeField] + private AudioClip m_VictoryClip; + + [SerializeField] + private AudioClip m_JumpSound; + [SerializeField, BoxGroup("Settings")] private float m_speed = 2.0f; @@ -73,25 +82,32 @@ public class CharacterInputController : MonoBehaviour public void OnLandHappened() { - m_animator.SetTrigger("Land"); + m_animator.SetTrigger("Land"); } public void OnJumpHappened() { m_animator.SetTrigger("Land"); + //AudioSource.PlayClipAtPoint(m_JumpSound, transform.position); } public void OnDeath(bool value) { - if (value) + if (value) + { m_animator.SetTrigger("Death"); + AudioSource.PlayClipAtPoint(m_DeathSound, transform.position); + } else m_animator.SetTrigger("Respawn"); } public void OnVictory(bool value) { - if (value) + if (value) + { m_animator.SetTrigger("Victory"); + AudioSource.PlayClipAtPoint(m_VictoryClip, transform.position); + } }