From 1898a5f28dfffa7bbecf5d2bf024f20b8d0490e7 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 26 三月 2026 15:08:56 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts

---
 Main/System/SystemSetting/SystemSetting.cs |   57 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/Main/System/SystemSetting/SystemSetting.cs b/Main/System/SystemSetting/SystemSetting.cs
index 9bf7362..94f1b4a 100644
--- a/Main/System/SystemSetting/SystemSetting.cs
+++ b/Main/System/SystemSetting/SystemSetting.cs
@@ -11,8 +11,10 @@
 
 {
     const string QUALITY_LEVEL_KEY = "GameQualityLevel";
-    const string SOUND_VOLUME_KEY = "SoundRatioKey";  //闊充箰
-    const string SOUND_EFFECT_KEY = "SoundEffect"; //闊虫晥
+    const string SOUND_VOLUME_KEY = "MusicKey";  //闊充箰
+    const string SOUND_EFFECT_KEY = "SoundEffectKey"; //闊虫晥
+    const string MUTE_MUSIC_KEY = "MuteMusicKey"; //闈欓煶闊充箰
+    const string MUTE_SOUND_EFFECT_KEY = "MuteSoundEffectKey"; //闈欓煶闊虫晥
     const string GAMEFRAME_KEY = "GameFrameSetting";//鍨傜洿鍚屾鐜�
 
     public Dictionary<SystemSwitch, bool> systemSettings = new Dictionary<SystemSwitch, bool>();
@@ -26,6 +28,7 @@
 
     public SystemSetting()
     {
+        DTC0102_tagCDBPlayer.switchAccountEvent -= OnSwitchAccount;
         DTC0102_tagCDBPlayer.switchAccountEvent += OnSwitchAccount;
     }
 
@@ -42,17 +45,41 @@
 
     public float GetSoundVolume()
     {
-        return LocalSave.GetFloat(SOUND_VOLUME_KEY, .55f);
+        return LocalSave.GetFloat(SOUND_VOLUME_KEY, 0.3f);
     }
 
     public void SetSoundEffect(float value)
     {
         LocalSave.SetFloat(SOUND_EFFECT_KEY, Mathf.Clamp01(value));
+        EventBroadcast.Instance.Broadcast(EventName.SOUND_EFFECT_VOLUME_CHANGE, value);
     }
 
     public float GetSoundEffect()
     {
-        return LocalSave.GetFloat(SOUND_EFFECT_KEY, .8f);
+        return LocalSave.GetFloat(SOUND_EFFECT_KEY, 0.6f);
+    }
+
+    public void SetMuteMusic(bool _mute)
+    {
+        LocalSave.SetBool(MUTE_MUSIC_KEY, _mute);
+        SoundPlayer.Instance.musicAudioSource.mute = _mute;
+    }
+
+    public bool GetMuteMusic()
+    {
+        return LocalSave.GetBool(MUTE_MUSIC_KEY, false);
+    }
+
+    public void SetMuteSoundEffect(bool _mute)
+    {
+        LocalSave.SetBool(MUTE_SOUND_EFFECT_KEY, _mute);
+        SoundPlayer.Instance.MuteSoundEffect(_mute);
+        EventBroadcast.Instance.Broadcast(EventName.SOUND_EFFECT_MUTE_CHANGE, _mute);
+    }
+
+    public bool GetMuteSoundEffect()
+    {
+        return LocalSave.GetBool(MUTE_SOUND_EFFECT_KEY, false);
     }
 
     public void SetGameFps(GameFps _frame)
@@ -162,18 +189,18 @@
                 break;
         }
 
-#if UNITY_ANDROID && !UNITY_EDITOR
-        if (_disabeCamera)
-        {
-            CameraManager.uiCamera.enabled = false;
-        }
+// #if !UNITY_EDITOR
+//         if (_disabeCamera)
+//         {
+//             CameraManager.uiCamera.enabled = false;
+//         }
 
-        ResolutionUtility.AdjustResolution(_quality);
-        if (_disabeCamera)
-        {
-            Co_WaitFewMinute();
-        }
-#endif
+//         ResolutionUtility.AdjustResolution(_quality);
+//         if (_disabeCamera)
+//         {
+//             Co_WaitFewMinute();
+//         }
+// #endif
 
         if (qualityLevelChangeEvent != null)
         {

--
Gitblit v1.8.0