| | |
| | | using UnityEngine; |
| | | using UnityEngine.Events; |
| | | using System; |
| | | using vnxbqy.UI; |
| | | using System.Collections; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | |
| | | |
| | | { |
| | | 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>(); |
| | |
| | | |
| | | public SystemSetting() |
| | | { |
| | | DTC0102_tagCDBPlayer.switchAccountEvent -= OnSwitchAccount; |
| | | DTC0102_tagCDBPlayer.switchAccountEvent += OnSwitchAccount; |
| | | } |
| | | |
| | |
| | | |
| | | public float GetSoundVolume() |
| | | { |
| | | return LocalSave.GetFloat(SOUND_VOLUME_KEY, .55f); |
| | | return LocalSave.GetFloat(SOUND_VOLUME_KEY, 0.3f); |
| | | } |
| | | |
| | | public void SetSoundEffect(float 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); |
| | | } |
| | | |
| | | public bool GetMuteSoundEffect() |
| | | { |
| | | return LocalSave.GetBool(MUTE_SOUND_EFFECT_KEY, false); |
| | | } |
| | | |
| | | public void SetGameFps(GameFps _frame) |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | public void LetFPSUnLimit() |
| | | { |
| | | Application.targetFrameRate = 1000; |
| | | // Application.targetFrameRate = 1000; |
| | | } |
| | | |
| | | private void OnSwitchAccount() |