diff --git a/Assets/Audio.meta b/Assets/Audio.meta new file mode 100644 index 0000000..7de8f3d --- /dev/null +++ b/Assets/Audio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8827369e8ed2ef42b9708a886edb2f7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/Attack Movement.wav b/Assets/Audio/Attack Movement.wav new file mode 100644 index 0000000..28d90f2 Binary files /dev/null and b/Assets/Audio/Attack Movement.wav differ diff --git a/Assets/Audio/Attack Movement.wav.meta b/Assets/Audio/Attack Movement.wav.meta new file mode 100644 index 0000000..f29a04c --- /dev/null +++ b/Assets/Audio/Attack Movement.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 17ff756d97e376447a3b0e93e86b28c8 +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: diff --git a/Assets/Audio/Battle Music.wav b/Assets/Audio/Battle Music.wav new file mode 100644 index 0000000..846e0bf Binary files /dev/null and b/Assets/Audio/Battle Music.wav differ diff --git a/Assets/Audio/Battle Music.wav.meta b/Assets/Audio/Battle Music.wav.meta new file mode 100644 index 0000000..37ca225 --- /dev/null +++ b/Assets/Audio/Battle Music.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 33d447e1dd6feee4caf49c5498c0ccde +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: diff --git a/Assets/Audio/Clicking GO Beep.wav b/Assets/Audio/Clicking GO Beep.wav new file mode 100644 index 0000000..d6e1bd9 Binary files /dev/null and b/Assets/Audio/Clicking GO Beep.wav differ diff --git a/Assets/Audio/Clicking GO Beep.wav.meta b/Assets/Audio/Clicking GO Beep.wav.meta new file mode 100644 index 0000000..2790b54 --- /dev/null +++ b/Assets/Audio/Clicking GO Beep.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 631faf0a042bc1f409447a50b433f282 +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: diff --git a/Assets/Audio/Hit Animation Explosion.wav b/Assets/Audio/Hit Animation Explosion.wav new file mode 100644 index 0000000..a19db7f Binary files /dev/null and b/Assets/Audio/Hit Animation Explosion.wav differ diff --git a/Assets/Audio/Hit Animation Explosion.wav.meta b/Assets/Audio/Hit Animation Explosion.wav.meta new file mode 100644 index 0000000..75c7564 --- /dev/null +++ b/Assets/Audio/Hit Animation Explosion.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1558af4a88fd29545ab9b0e8d058eb8d +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: diff --git a/Assets/Audio/Shield Hit Animation.wav b/Assets/Audio/Shield Hit Animation.wav new file mode 100644 index 0000000..930a333 Binary files /dev/null and b/Assets/Audio/Shield Hit Animation.wav differ diff --git a/Assets/Audio/Shield Hit Animation.wav.meta b/Assets/Audio/Shield Hit Animation.wav.meta new file mode 100644 index 0000000..6a87b0a --- /dev/null +++ b/Assets/Audio/Shield Hit Animation.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8c705fbb65eaec349ac524eabbd6b1da +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: diff --git a/Assets/Audio/Soft Party Member Beep.wav b/Assets/Audio/Soft Party Member Beep.wav new file mode 100644 index 0000000..dfea37d Binary files /dev/null and b/Assets/Audio/Soft Party Member Beep.wav differ diff --git a/Assets/Audio/Soft Party Member Beep.wav.meta b/Assets/Audio/Soft Party Member Beep.wav.meta new file mode 100644 index 0000000..8234910 --- /dev/null +++ b/Assets/Audio/Soft Party Member Beep.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a0801645ce8a5bf4e83e2d27f7912be1 +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: diff --git a/Assets/Audio/Weak Point Hit Animation Explosion.wav b/Assets/Audio/Weak Point Hit Animation Explosion.wav new file mode 100644 index 0000000..6c18ec2 Binary files /dev/null and b/Assets/Audio/Weak Point Hit Animation Explosion.wav differ diff --git a/Assets/Audio/Weak Point Hit Animation Explosion.wav.meta b/Assets/Audio/Weak Point Hit Animation Explosion.wav.meta new file mode 100644 index 0000000..89994aa --- /dev/null +++ b/Assets/Audio/Weak Point Hit Animation Explosion.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b72cdd9fa6b85c74e8b1ba40d7de7743 +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: diff --git a/Assets/Scenes/Battle Scene.unity b/Assets/Scenes/Battle Scene.unity index bf83f99..fff4618 100644 --- a/Assets/Scenes/Battle Scene.unity +++ b/Assets/Scenes/Battle Scene.unity @@ -2583,6 +2583,146 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1144941703} m_CullTransparentMesh: 0 +--- !u!1 &1181772757 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1181772759} + - component: {fileID: 1181772758} + - component: {fileID: 1181772760} + m_Layer: 0 + m_Name: Battle Music + m_TagString: Music + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!82 &1181772758 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1181772757} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 33d447e1dd6feee4caf49c5498c0ccde, type: 3} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 1 + 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!4 &1181772759 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1181772757} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 30 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1181772760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1181772757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3cb1512e426305e4dae6e71a16b738ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1191941974 GameObject: m_ObjectHideFlags: 0 @@ -3650,6 +3790,7 @@ GameObject: m_Component: - component: {fileID: 1480396848} - component: {fileID: 1480396847} + - component: {fileID: 1480396849} m_Layer: 0 m_Name: GM m_TagString: Untagged @@ -3777,6 +3918,13 @@ MonoBehaviour: - {fileID: 21300000, guid: 05aa6655ade64e94eba7686ed02f9977, type: 3} - {fileID: 21300000, guid: 446f2d0480c23394f8e89d23746f3d7f, type: 3} - {fileID: 21300000, guid: 8ed265c5333033f42bfcda66a797be1a, type: 3} + SoundEffects: + - {fileID: 8300000, guid: 631faf0a042bc1f409447a50b433f282, type: 3} + - {fileID: 8300000, guid: a0801645ce8a5bf4e83e2d27f7912be1, type: 3} + - {fileID: 8300000, guid: 17ff756d97e376447a3b0e93e86b28c8, type: 3} + - {fileID: 8300000, guid: 1558af4a88fd29545ab9b0e8d058eb8d, type: 3} + - {fileID: 8300000, guid: b72cdd9fa6b85c74e8b1ba40d7de7743, type: 3} + - {fileID: 8300000, guid: 8c705fbb65eaec349ac524eabbd6b1da, type: 3} --- !u!4 &1480396848 Transform: m_ObjectHideFlags: 0 @@ -3791,6 +3939,102 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &1480396849 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480396846} + 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!1 &1528803801 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/GMScript.cs b/Assets/Scripts/GMScript.cs index f61772e..50fc72d 100644 --- a/Assets/Scripts/GMScript.cs +++ b/Assets/Scripts/GMScript.cs @@ -47,6 +47,8 @@ public class GMScript : MonoBehaviour public Sprite[] Symbols; + public AudioClip[] SoundEffects; + private bool partyRedo = false; private bool cursorLock = false; private bool noRepeat = true; @@ -73,6 +75,8 @@ public class GMScript : MonoBehaviour private ShakeScript shake; + private AudioSource audioPlayer; + enum Colours { Red, Brown, Orange, Amber, Yellow, Lime, @@ -92,6 +96,9 @@ public class GMScript : MonoBehaviour partyHealth = 8; level = PlayerPrefs.GetInt("Level"); shake = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent(); + audioPlayer = this.GetComponent(); + + GameObject.FindGameObjectWithTag("Music").GetComponent().PlayMusic(); if(PlayerPrefs.GetInt("GameMode") == 0 || PlayerPrefs.GetInt("GameMode") == 2) @@ -343,6 +350,9 @@ public class GMScript : MonoBehaviour if(hit.collider.gameObject.tag == "Party") { + + audioPlayer.PlayOneShot(SoundEffects[0]); + CheckParty(hit.collider.gameObject); if(noRepeat) @@ -358,6 +368,8 @@ public class GMScript : MonoBehaviour if(hit.collider.gameObject.tag == "Attack" && PartyMemberOrder[0] != null) { + audioPlayer.PlayOneShot(SoundEffects[1]); + cursorLock = true; StartCoroutine(AttackParty(robotColour)); @@ -429,6 +441,7 @@ public class GMScript : MonoBehaviour if(hit.collider.gameObject.tag == "Back") { + audioPlayer.PlayOneShot(SoundEffects[1]); SceneManager.LoadScene("Mode Select Scene"); } } @@ -567,6 +580,8 @@ public class GMScript : MonoBehaviour Animator attack = PartyMembers[OrderNumbers[i]-1].transform.GetComponent(); attack.SetTrigger("AttackTrigger"); + audioPlayer.PlayOneShot(SoundEffects[2]); + yield return new WaitForSeconds( attack.GetCurrentAnimatorStateInfo(0).length +attack.GetCurrentAnimatorStateInfo(0).normalizedTime); @@ -674,6 +689,7 @@ public class GMScript : MonoBehaviour Animator hit = Hit.transform.GetComponent(); shake.camShake(); + audioPlayer.PlayOneShot(SoundEffects[3]); yield return new WaitForSeconds( hit.GetCurrentAnimatorStateInfo(0).length * 2 +hit.GetCurrentAnimatorStateInfo(0).normalizedTime); @@ -719,6 +735,7 @@ public class GMScript : MonoBehaviour Animator hit = EnemyHit.transform.GetComponent(); yield return new WaitForSeconds( + //DIFFERENT SOUND EFFECT FOR ABILITY MOVES hit.GetCurrentAnimatorStateInfo(0).length * 2 +hit.GetCurrentAnimatorStateInfo(0).normalizedTime); @@ -799,6 +816,7 @@ public class GMScript : MonoBehaviour Animator hit = EnemyHit.transform.GetComponent(); shake.camShake(); + audioPlayer.PlayOneShot(SoundEffects[3]); yield return new WaitForSeconds( hit.GetCurrentAnimatorStateInfo(0).length * 2 +hit.GetCurrentAnimatorStateInfo(0).normalizedTime); @@ -1048,11 +1066,16 @@ public class GMScript : MonoBehaviour if((shield || enemyShield) && (displayColour != Colours.White && displayColour != Colours.Grey - && displayColour != Colours.Black)) ShieldHit.SetActive(true); + && displayColour != Colours.Black)) + { + audioPlayer.PlayOneShot(SoundEffects[5]); + ShieldHit.SetActive(true); + } if(weakPointHit) { weakPointHit = false; + audioPlayer.PlayOneShot(SoundEffects[4]); WeakPointHit.SetActive(true); } @@ -1064,6 +1087,7 @@ public class GMScript : MonoBehaviour Animator enemyAttackAnim = EnemyParts[arm].transform.GetComponent(); enemyAttackAnim.SetTrigger("AttackTrigger"); + audioPlayer.PlayOneShot(SoundEffects[2]); yield return new WaitForSeconds( enemyAttackAnim.GetCurrentAnimatorStateInfo(0).length +enemyAttackAnim.GetCurrentAnimatorStateInfo(0).normalizedTime); diff --git a/Assets/Scripts/MusicScript.cs b/Assets/Scripts/MusicScript.cs new file mode 100644 index 0000000..e1719a2 --- /dev/null +++ b/Assets/Scripts/MusicScript.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class MusicScript : MonoBehaviour +{ + private AudioSource audioSource; + private void Awake() + { + DontDestroyOnLoad(transform.gameObject); + audioSource = GetComponent(); + } + + public void PlayMusic() + { + if (audioSource.isPlaying) return; + audioSource.Play(); + } + + public void StopMusic() + { + audioSource.Stop(); + } +} diff --git a/Assets/Scripts/MusicScript.cs.meta b/Assets/Scripts/MusicScript.cs.meta new file mode 100644 index 0000000..31e4e01 --- /dev/null +++ b/Assets/Scripts/MusicScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cb1512e426305e4dae6e71a16b738ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SelectScript.cs b/Assets/Scripts/SelectScript.cs index 05feeae..2ec6e8d 100644 --- a/Assets/Scripts/SelectScript.cs +++ b/Assets/Scripts/SelectScript.cs @@ -35,6 +35,8 @@ public class SelectScript : MonoBehaviour SideTrimObjectFlip.SetActive(false); SideTrimObjectFlip.tag = "SideTrim"; + GameObject.FindGameObjectWithTag("Music").GetComponent().StopMusic(); + } // Update is called once per frame diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 4363865..aa5ae52 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -16,6 +16,7 @@ TagManager: - ScreenShake - SideTrim - Quit + - Music layers: - Default - TransparentFX