diff --git a/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav b/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav new file mode 100644 index 0000000..a754bba Binary files /dev/null and b/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav differ diff --git a/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav.meta b/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav.meta new file mode 100644 index 0000000..71c88d7 --- /dev/null +++ b/Assets/AudioResources/Sounds/Bluezone_BC0284_soundwave_weapon_scifi_shot_007_02 edited.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: d6edf602b3baa0741bd59cce098f05d5 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav b/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav new file mode 100644 index 0000000..80ee8b1 Binary files /dev/null and b/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav differ diff --git a/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav.meta b/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav.meta new file mode 100644 index 0000000..5685877 --- /dev/null +++ b/Assets/AudioResources/Sounds/Bonus_Drone_4 thrust noise.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 025361f5b3f97a445ad89bc9ac61c30b +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav b/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav new file mode 100644 index 0000000..69f7173 Binary files /dev/null and b/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav differ diff --git a/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav.meta b/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav.meta new file mode 100644 index 0000000..b1663d7 --- /dev/null +++ b/Assets/AudioResources/Sounds/TOOL_Nailgun_01_mono edited.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 2fffe98b7bb97034a84e2153e8456258 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav b/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav new file mode 100644 index 0000000..4c2fe0f Binary files /dev/null and b/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav differ diff --git a/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav.meta b/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav.meta new file mode 100644 index 0000000..34bd21e --- /dev/null +++ b/Assets/AudioResources/Sounds/TOOL_Nailgun_02_mono edit.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 029b2e37eed317c49841bf21a7a69233 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Audio/Thruster Sound 01.prefab b/Assets/Prefabs/Audio/Boost Sound 1.prefab similarity index 93% rename from Assets/Prefabs/Audio/Thruster Sound 01.prefab rename to Assets/Prefabs/Audio/Boost Sound 1.prefab index bce5d57..f909a49 100644 --- a/Assets/Prefabs/Audio/Thruster Sound 01.prefab +++ b/Assets/Prefabs/Audio/Boost Sound 1.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 3310727599597512245} - component: {fileID: 7696877450501702533} m_Layer: 0 - m_Name: Thruster Sound 01 + m_Name: Boost Sound 1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -46,7 +46,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: id: 1 - audioTag: sound + audioTag: booster + pitchRange: 0.3 + volumeRange: 0.3 --- !u!82 &7696877450501702533 AudioSource: m_ObjectHideFlags: 0 @@ -57,18 +59,18 @@ AudioSource: m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 82a8d17c2698c834f96370756847edec, type: 3} + m_audioClip: {fileID: 8300000, guid: d6edf602b3baa0741bd59cce098f05d5, type: 3} m_PlayOnAwake: 0 - m_Volume: 0.112 - m_Pitch: 0.95 - Loop: 1 + m_Volume: 0.09 + m_Pitch: 0.9 + Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 DopplerLevel: 0 MinDistance: 1 - MaxDistance: 500 + MaxDistance: 100 Pan2D: 0 rolloffMode: 1 BypassEffects: 0 diff --git a/Assets/Prefabs/Audio/Boost Sound 1.prefab.meta b/Assets/Prefabs/Audio/Boost Sound 1.prefab.meta new file mode 100644 index 0000000..f18498c --- /dev/null +++ b/Assets/Prefabs/Audio/Boost Sound 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2d949767c4bbb2d4c84c31779148dd2d +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Audio/Critical Tackle 1.prefab b/Assets/Prefabs/Audio/Critical Tackle 1.prefab new file mode 100644 index 0000000..5a5a244 --- /dev/null +++ b/Assets/Prefabs/Audio/Critical Tackle 1.prefab @@ -0,0 +1,147 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4479628772504131522 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6423719894035945655} + - component: {fileID: 3310727599597512245} + - component: {fileID: 7696877450501702533} + m_Layer: 0 + m_Name: Critical Tackle 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6423719894035945655 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3310727599597512245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 887650ff1f3850a43aa8d1281fc70528, type: 3} + m_Name: + m_EditorClassIdentifier: + id: 1 + audioTag: critical_tackle + pitchRange: 0.3 + volumeRange: 0.3 +--- !u!82 &7696877450501702533 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 029b2e37eed317c49841bf21a7a69233, type: 3} + m_PlayOnAwake: 0 + m_Volume: 0.2 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 0 + MinDistance: 1 + MaxDistance: 100 + Pan2D: 0 + rolloffMode: 1 + 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: 1 + 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: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Assets/Prefabs/Audio/Critical Tackle 1.prefab.meta b/Assets/Prefabs/Audio/Critical Tackle 1.prefab.meta new file mode 100644 index 0000000..ba6aefc --- /dev/null +++ b/Assets/Prefabs/Audio/Critical Tackle 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 55bb0ab820069b74ebd9593beb03c465 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Audio/Main Menu Music.prefab b/Assets/Prefabs/Audio/Main Menu Music.prefab index e1ac6bd..ac6d817 100644 --- a/Assets/Prefabs/Audio/Main Menu Music.prefab +++ b/Assets/Prefabs/Audio/Main Menu Music.prefab @@ -45,11 +45,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 887650ff1f3850a43aa8d1281fc70528, type: 3} m_Name: m_EditorClassIdentifier: - maxParallel: 1 id: 1 - audioTag: music - audioSource: {fileID: 7696877450501702533} - audioSources: [] + audioTag: main_menu_music --- !u!82 &7696877450501702533 AudioSource: m_ObjectHideFlags: 0 @@ -64,7 +61,7 @@ AudioSource: m_PlayOnAwake: 0 m_Volume: 0.092 m_Pitch: 0.95 - Loop: 1 + Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 diff --git a/Assets/Prefabs/Audio/Normal Tackle 1.prefab b/Assets/Prefabs/Audio/Normal Tackle 1.prefab new file mode 100644 index 0000000..40139a6 --- /dev/null +++ b/Assets/Prefabs/Audio/Normal Tackle 1.prefab @@ -0,0 +1,147 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4479628772504131522 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6423719894035945655} + - component: {fileID: 3310727599597512245} + - component: {fileID: 7696877450501702533} + m_Layer: 0 + m_Name: Normal Tackle 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6423719894035945655 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3310727599597512245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 887650ff1f3850a43aa8d1281fc70528, type: 3} + m_Name: + m_EditorClassIdentifier: + id: 1 + audioTag: normal_tackle + pitchRange: 0.3 + volumeRange: 0.3 +--- !u!82 &7696877450501702533 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 2fffe98b7bb97034a84e2153e8456258, type: 3} + m_PlayOnAwake: 0 + m_Volume: 0.15 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 0 + MinDistance: 1 + MaxDistance: 100 + Pan2D: 0 + rolloffMode: 1 + 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: 1 + 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: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Assets/Prefabs/Audio/Normal Tackle 1.prefab.meta b/Assets/Prefabs/Audio/Normal Tackle 1.prefab.meta new file mode 100644 index 0000000..6f804e1 --- /dev/null +++ b/Assets/Prefabs/Audio/Normal Tackle 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c209fe6bd4ff4a4095b661bbd7ebc10 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Audio/Thruster Sound 1.prefab b/Assets/Prefabs/Audio/Thruster Sound 1.prefab new file mode 100644 index 0000000..38a8de5 --- /dev/null +++ b/Assets/Prefabs/Audio/Thruster Sound 1.prefab @@ -0,0 +1,147 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4479628772504131522 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6423719894035945655} + - component: {fileID: 3310727599597512245} + - component: {fileID: 7696877450501702533} + m_Layer: 0 + m_Name: Thruster Sound 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6423719894035945655 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3310727599597512245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 887650ff1f3850a43aa8d1281fc70528, type: 3} + m_Name: + m_EditorClassIdentifier: + id: 1 + audioTag: thruster + pitchRange: 0.4 + volumeRange: 0.3 +--- !u!82 &7696877450501702533 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4479628772504131522} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 025361f5b3f97a445ad89bc9ac61c30b, type: 3} + m_PlayOnAwake: 0 + m_Volume: 0.08 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 0 + MinDistance: 1 + MaxDistance: 100 + Pan2D: 0 + rolloffMode: 1 + 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: 1 + 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: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Assets/Prefabs/Audio/Thruster Sound 01.prefab.meta b/Assets/Prefabs/Audio/Thruster Sound 1.prefab.meta similarity index 100% rename from Assets/Prefabs/Audio/Thruster Sound 01.prefab.meta rename to Assets/Prefabs/Audio/Thruster Sound 1.prefab.meta diff --git a/Assets/Prefabs/Ships/Blue Ship.prefab b/Assets/Prefabs/Ships/Blue Ship.prefab index f942654..c15de12 100644 --- a/Assets/Prefabs/Ships/Blue Ship.prefab +++ b/Assets/Prefabs/Ships/Blue Ship.prefab @@ -263,10 +263,10 @@ BoxCollider: m_Bits: 0 m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 + m_ProvidesContacts: 1 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 2.5, y: 0.5, z: 0.3} + m_Size: {x: 2.5, y: 0.6, z: 0.6} m_Center: {x: 0, y: 1.2, z: 0} --- !u!65 &4924634183815263034 BoxCollider: @@ -284,10 +284,10 @@ BoxCollider: m_Bits: 0 m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 + m_ProvidesContacts: 1 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 0.5, y: 2.5, z: 0.3} + m_Size: {x: 0.6, y: 2.5, z: 0.6} m_Center: {x: 0, y: 0.5, z: 0} --- !u!114 &2704141135220834432 MonoBehaviour: diff --git a/Assets/Prefabs/Ships/Red Ship.prefab b/Assets/Prefabs/Ships/Red Ship.prefab index fb68ce8..a39add3 100644 --- a/Assets/Prefabs/Ships/Red Ship.prefab +++ b/Assets/Prefabs/Ships/Red Ship.prefab @@ -153,10 +153,10 @@ BoxCollider: m_Bits: 0 m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 + m_ProvidesContacts: 1 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 2.5, y: 0.5, z: 0.3} + m_Size: {x: 2.5, y: 0.6, z: 0.6} m_Center: {x: 0, y: 1.2, z: 0} --- !u!65 &6404226307182575358 BoxCollider: @@ -174,10 +174,10 @@ BoxCollider: m_Bits: 0 m_LayerOverridePriority: 0 m_IsTrigger: 0 - m_ProvidesContacts: 0 + m_ProvidesContacts: 1 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 0.5, y: 2.5, z: 0.3} + m_Size: {x: 0.6, y: 2.5, z: 0.6} m_Center: {x: 0, y: 0.5, z: 0} --- !u!1 &5332524459205227969 GameObject: diff --git a/Assets/Scripts/ManageableAudio.cs b/Assets/Scripts/ManageableAudio.cs index 557319a..dc0cdcf 100644 --- a/Assets/Scripts/ManageableAudio.cs +++ b/Assets/Scripts/ManageableAudio.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Reflection; using log4net; using PrimeTween; +using Unity.VisualScripting; using UnityEngine; public class ManageableAudio : MonoBehaviour @@ -12,15 +13,23 @@ public class ManageableAudio : MonoBehaviour public int id = 0; public string audioTag = "audio"; + public float pitchRange = 0.3f; + public float volumeRange = 0.3f; public AudioSource AudioSource { get; set; } + private float initialVolume; + private float initialPitch; + private bool IsUpdating = false; + private bool WasOneShotTriggered = false; void Awake() { if (gameObject.TryGetComponent(out AudioSource audioS)) { AudioSource = audioS; + initialVolume = AudioSource.volume; + initialPitch = AudioSource.pitch; } else { @@ -30,16 +39,27 @@ public class ManageableAudio : MonoBehaviour } } - public void PlayAudio() + /// + /// Start playing the sound source. + /// + /// Should the sound loop + /// Play sound only once until reset + public void PlayAudio(bool playLooping, bool isOneShot = false) { - if (AudioSource == null || IsUpdating || AudioSource.isPlaying) + if (AudioSource == null + || IsUpdating + || AudioSource.isPlaying + || WasOneShotTriggered) { return; } - if (!AudioSource.enabled) + if (isOneShot) { - AudioSource.enabled = true; + WasOneShotTriggered = true; } + AudioSource.enabled = true; + AudioSource.loop = playLooping; + AudioSource.Play(); } @@ -52,9 +72,26 @@ public class ManageableAudio : MonoBehaviour if (AudioSource.isPlaying) { AudioSource.Stop(); + // TODO: Reset audio properties? } } + /// + /// Updates the pitch of the audio clip. + /// + /// -1 to 1 times the max pitch range + /// of this sound. + public void ChangePitch(float changeValue) + { + changeValue = Mathf.Clamp(changeValue, -1, 1); + AudioSource.pitch = initialPitch + (changeValue * pitchRange); + } + + public void ChangeVolume(float changeValue) + { + AudioSource.volume = initialVolume + (changeValue * volumeRange); + } + public void FadeOutAudio(float duration = 1) { if (IsUpdating) @@ -63,12 +100,35 @@ public class ManageableAudio : MonoBehaviour } IsUpdating = true; float initVolume = AudioSource.volume; - Tween.Custom(initVolume, 0, duration, onValueChange: value => AudioSource.volume = value) + Tween.Custom(initVolume, 0, duration, onValueChange: value => + { + if (AudioSource.IsDestroyed()) + { + return; + } + AudioSource.volume = value; + }) .OnComplete(() => { + if (AudioSource.IsDestroyed()) + { + return; + } IsUpdating = false; StopAudio(); AudioSource.volume = initVolume; }); } + + /// + /// Makes starting this sound possible again, + /// if it was set to only play once. + /// + public void ResetOneShot() + { + if (!AudioSource.isPlaying) + { + WasOneShotTriggered = false; + } + } } diff --git a/Assets/Scripts/Managers/AudioManager.cs b/Assets/Scripts/Managers/AudioManager.cs index d5801a1..32eaa39 100644 --- a/Assets/Scripts/Managers/AudioManager.cs +++ b/Assets/Scripts/Managers/AudioManager.cs @@ -1,8 +1,10 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using log4net; using UnityEditor; +using UnityEditor.PackageManager; using UnityEngine; namespace Managers @@ -173,16 +175,24 @@ namespace Managers private GameObject SearchSound(string audioTag = null, int id = -1, string prefabName = null) { - if (prefabName == null) + try { - return audioDictionary. - Where(manageableAudio => manageableAudio.Key.audioTag == audioTag). - First(manageableAudio => manageableAudio.Key.id == id).Value; + if (prefabName == null) + { + return audioDictionary. + Where(manageableAudio => manageableAudio.Key.audioTag == audioTag)?. + First(manageableAudio => manageableAudio.Key.id == id).Value; + } + else + { + return audioDictionary. + First(manageableAudio => manageableAudio.Value.name == prefabName).Value; + } } - else + catch (Exception e) { - return audioDictionary. - First(manageableAudio => manageableAudio.Value.name == prefabName).Value; + Log.Error(e.Message); + return null; } } diff --git a/Assets/Scripts/Ship.cs b/Assets/Scripts/Ship.cs index fd76961..5b80631 100644 --- a/Assets/Scripts/Ship.cs +++ b/Assets/Scripts/Ship.cs @@ -28,6 +28,13 @@ public class Ship : MonoBehaviour private Zone zone = Zone.NimbleZone; private ManageableAudio ThrusterSound; + private ManageableAudio BoosterSound; + private ManageableAudio ZoneChangeSound; + private ManageableAudio TackleOpponentSound; + private ManageableAudio CriticalTackleOpponentSound; + private ManageableAudio BeingTackledSound; + private ManageableAudio BeingCriticallyTackledSound; + private ManageableAudio CrashOutOfBoundsSound; void Awake() { @@ -37,7 +44,11 @@ public class Ship : MonoBehaviour GetComponent(); } body = GetComponent(); - ThrusterSound = AudioManager.G.GetLocalSound("sound", 1, gameObject.transform); + ThrusterSound = AudioManager.G.GetLocalSound("thruster", 1, gameObject.transform); + BoosterSound = AudioManager.G.GetLocalSound("booster", 1, gameObject.transform); + BeingTackledSound = AudioManager.G.GetLocalSound("normal_tackle", 1, gameObject.transform); + BeingCriticallyTackledSound = AudioManager.G.GetLocalSound("critical_tackle", 1, gameObject.transform); + //ZoneChangeSound = AudioManager.G.GetLocalSound("thruster_sound", 1, gameObject.transform); } // Start is called before the first frame update @@ -88,6 +99,7 @@ public class Ship : MonoBehaviour // Rotate the vehicle with the current steer velocity // Calculate the magnitude of the acceleration with the current thrust UpdateMovement(); + UpdateSounds(); BoostStateUpdate(Time.deltaTime); UpdateTackleResponse(isCriticalTackle); } @@ -97,19 +109,10 @@ public class Ship : MonoBehaviour /// void UpdateMovement() { - if (math.abs(state.thrustInput) > 0) - { - ThrusterSound.PlayAudio(); - } - else - { - ThrusterSound.FadeOutAudio(0.3f); - } //Debug.Log("inupdatemove " + currentThrustInput); // Player rotation is always possible and same speed transform.Rotate(0, 0, -props.steerVelocity * state.steerInput * Time.deltaTime); - transform.localEulerAngles = new Vector3(0, 0, transform.localEulerAngles.z); // Get and apply the current Gravity state.currentGravity = forceManager.GetGravityForInstance(InstanceID)(transform); @@ -159,7 +162,9 @@ public class Ship : MonoBehaviour Debug.DrawRay(transform.position, transform.up * (currentVelocity.magnitude + 3) * 0.5f, Color.black); - body.transform.localPosition = body.transform.localPosition - new Vector3(0, 0, body.transform.localPosition.z); + // Fix the ship to the virtual 2D plane of the game + transform.localEulerAngles = new Vector3(0, 0, transform.localEulerAngles.z); + body.transform.localPosition -= new Vector3(0, 0, transform.localPosition.z); } /// @@ -324,10 +329,49 @@ public class Ship : MonoBehaviour } Vector3 colliderVelocity = collider.attachedRigidbody.velocity; Vector3 tackleDirection = transform.position - collider.transform.position; - tackleDirection = Vector3.ProjectOnPlane(tackleDirection, Vector3.Cross(transform.up, transform.right)); + + // tackleDirection = Vector3.ProjectOnPlane(tackleDirection, + // Vector3.Cross(transform.up, transform.right)); + body.AddForce(colliderVelocity.magnitude * tackleDirection * tacklePowerFactor, ForceMode.Acceleration); UpdateTackleResponse(true); } + void UpdateSounds() + { + if (math.abs(state.thrustInput) > 0 || IsBoosting()) + { + ThrusterSound.PlayAudio(true); + + ThrusterSound.ChangePitch( + math.smoothstep(0, props.normalMaxVelocity, body.velocity.magnitude)); + } + else + { + ThrusterSound.FadeOutAudio(0.3f); + } + if (IsBoosting()) + { + BoosterSound.PlayAudio(false, true); + } + else + { + BoosterSound.ResetOneShot(); + } + if (isTackled && !isCriticalTackle) + { + BeingTackledSound.PlayAudio(false, true); + } + if (isCriticalTackle) + { + BeingCriticallyTackledSound.PlayAudio(false, true); + } + if (!isTackled) + { + BeingCriticallyTackledSound.ResetOneShot(); + BeingTackledSound.ResetOneShot(); + } + } + } diff --git a/Assets/SlimUI/Modern Menu 1/Scripts/Managers/SlimUIMainMenu.cs b/Assets/SlimUI/Modern Menu 1/Scripts/Managers/SlimUIMainMenu.cs index b7c6f5a..cbb1f39 100644 --- a/Assets/SlimUI/Modern Menu 1/Scripts/Managers/SlimUIMainMenu.cs +++ b/Assets/SlimUI/Modern Menu 1/Scripts/Managers/SlimUIMainMenu.cs @@ -100,8 +100,8 @@ namespace SlimUI.ModernMenu firstMenu.SetActive(true); // Position1(); SetThemeColors(); - MainMenuMusic = AudioManager.G.GetGlobalSound("music", 1, true); - MainMenuMusic.PlayAudio(); + MainMenuMusic = AudioManager.G.GetGlobalSound("main_menu_music", 1, true); + MainMenuMusic.PlayAudio(true); } void SetThemeColors()