diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity index e518869..b1eab88 100644 --- a/Assets/Scenes/MainMenu.unity +++ b/Assets/Scenes/MainMenu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.010486943, g: 0.05298245, b: 0.15319028, a: 1} + m_IndirectSpecularColor: {r: 0.010481385, g: 0.052960172, b: 0.15313068, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1300,7 +1300,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7237433744057047553, guid: df02591cd5be4aa409b2523b5fe03ae1, type: 3} propertyPath: m_RootOrder - value: 5 + value: 6 objectReference: {fileID: 0} - target: {fileID: 7237433744057047553, guid: df02591cd5be4aa409b2523b5fe03ae1, type: 3} propertyPath: m_LocalScale.x @@ -1844,7 +1844,7 @@ MonoBehaviour: m_text: 'SFX:' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} - m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2} + m_sharedMaterial: {fileID: 2140032, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -2397,7 +2397,7 @@ MonoBehaviour: m_text: Options m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} - m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2} + m_sharedMaterial: {fileID: 2140032, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -2808,7 +2808,7 @@ MonoBehaviour: m_text: Music m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} - m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2} + m_sharedMaterial: {fileID: 2140032, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -2943,7 +2943,7 @@ MonoBehaviour: m_text: 'Master:' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} - m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2} + m_sharedMaterial: {fileID: 2140032, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] @@ -3006,7 +3006,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_hasFontAssetChanged: 1 + m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!222 &999137297 @@ -5445,7 +5445,7 @@ MonoBehaviour: m_text: Back m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} - m_sharedMaterial: {fileID: 2140032, guid: dc36b3fdc14f47ebb36fd484a67e268a, type: 2} + m_sharedMaterial: {fileID: 2140032, guid: 125cb55b44b24c4393181402bc6200e6, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] diff --git a/Assets/Scripts/PauseMenu.cs b/Assets/Scripts/PauseMenu.cs index fa944cf..d9bfc39 100644 --- a/Assets/Scripts/PauseMenu.cs +++ b/Assets/Scripts/PauseMenu.cs @@ -55,6 +55,7 @@ public class PauseMenu : MonoBehaviour { Time.timeScale = 1f; IsPaused = false; + SoundManager.Instance.SwitchMusicLayer(-1); SceneManager.LoadScene(0); } diff --git a/Assets/Scripts/SoundManager.cs b/Assets/Scripts/SoundManager.cs index 42e9d29..d1ac9e9 100644 --- a/Assets/Scripts/SoundManager.cs +++ b/Assets/Scripts/SoundManager.cs @@ -41,7 +41,7 @@ public class SoundManager : MonoBehaviour public void SwitchMusicLayer(int dimensionID) { if (dimensionMusicID != -1) StartCoroutine(FadeOut(dimensionMusicID)); - StartCoroutine(FadeIn(dimensionID)); + if (dimensionID != -1) StartCoroutine(FadeIn(dimensionID)); dimensionMusicID = dimensionID; } @@ -50,9 +50,9 @@ public class SoundManager : MonoBehaviour float time = 0; while (time < fadeTime) { + time += 0.05f; dimensionMusicLayer[dimensionID].volume = Mathf.Lerp(0, masterVolume * musicVolume, time / fadeTime); yield return new WaitForSeconds(0.05f); - time += 0.05f; } } @@ -61,9 +61,9 @@ public class SoundManager : MonoBehaviour float time = 0; while (time < fadeTime) { + time += 0.05f; dimensionMusicLayer[dimensionID].volume = Mathf.Lerp(masterVolume * musicVolume, 0, time / fadeTime); yield return new WaitForSeconds(0.05f); - time += 0.05f; } }