From 2b3fe1175765e0df62caba9dc160c0dbfefb0a8a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 06 二月 2026 12:22:12 +0800
Subject: [PATCH] 0312 优化断线界面返回登录界面
---
Main/System/SystemSetting/SystemSetting.cs | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/Main/System/SystemSetting/SystemSetting.cs b/Main/System/SystemSetting/SystemSetting.cs
index b38d9fa..fdc9e4f 100644
--- a/Main/System/SystemSetting/SystemSetting.cs
+++ b/Main/System/SystemSetting/SystemSetting.cs
@@ -13,6 +13,8 @@
const string QUALITY_LEVEL_KEY = "GameQualityLevel";
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>();
@@ -56,6 +58,28 @@
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);
+ }
+
+ public bool GetMuteSoundEffect()
+ {
+ return LocalSave.GetBool(MUTE_SOUND_EFFECT_KEY, false);
+ }
+
public void SetGameFps(GameFps _frame)
{
LocalSave.SetInt(GAMEFRAME_KEY, (int)_frame);
--
Gitblit v1.8.0