少年修仙传客户端代码仓库
client_linchunjie
2018-09-06 619a37b0c8c78845a034d1e36a5d77654f88a23e
System/SystemSetting/SystemSetWin.cs
@@ -50,7 +50,7 @@
            m_HighQuality.AddListener(OnSetQualityHigh);
            m_MediumQuality.AddListener(OnSetQualityMedium);
            m_LowQuality.AddListener(OnSetQualityLow);
            m_SixtyFrame.AddListener(SwitchVSyncCount);
            m_SixtyFrame.AddListener(SwitchGameFrame);
            m_OtherPlayer.AddListener(OnShowOrHideOtherPlayers);
            m_Monster.AddListener(OnShowOrHideMonsters);
@@ -82,7 +82,7 @@
            UpdateToggleSkin(m_OtherPlayer);
            UpdateToggleSkin(m_Monster);
            m_SixtyFrame.isOn = SystemSetting.Instance.GetVSyncCount() == 1;
            m_SixtyFrame.isOn = SystemSetting.Instance.GetGameFps() == GameFps.Full;
            var serverName = ServerListCenter.Instance.GetServerData(ServerListCenter.Instance.currentServer.region_flag).name;
            var playerAccount = PlayerDatas.Instance.baseData.AccID.Split('@');
@@ -116,7 +116,7 @@
            loginModel.accountBindOkEvent += UpdateAccountBindTitle;
            SDKUtility.Instance.onFreePlatfromDoIDAuthenticationOk += OnAuthenticationOk;
            SystemSetting.Instance.vSyncCountChangeEvent += OnSwitchVSyncCount;
            SystemSetting.Instance.gameFrameChangeEvent += OnSwitchGameFrame;
            SystemSetting.Instance.playerSyncCountChangeEvent += OnPlayerSyncCountChange;
            isInited = true;
@@ -127,7 +127,7 @@
            isInited = false;
            loginModel.accountBindOkEvent -= UpdateAccountBindTitle;
            SDKUtility.Instance.onFreePlatfromDoIDAuthenticationOk -= OnAuthenticationOk;
            SystemSetting.Instance.vSyncCountChangeEvent -= OnSwitchVSyncCount;
            SystemSetting.Instance.gameFrameChangeEvent -= OnSwitchGameFrame;
            SystemSetting.Instance.playerSyncCountChangeEvent -= OnPlayerSyncCountChange;
            SystemSetting.Instance.SetPlayerSyncCount(playerSyncCountRef);
        }
@@ -182,6 +182,7 @@
                SystemSetting.Instance.SetQualityLevel(GameQuality.Low);
                if (isInited)
                {
                    SystemSetting.Instance.SetGameFps(GameFps.Half);
                    SystemSetting.Instance.SetPlayerSyncCount(5);
                }
            }
@@ -189,25 +190,23 @@
            UpdateToggleSkin(m_LowQuality);
        }
        private void SwitchVSyncCount()
        private void SwitchGameFrame()
        {
            var currentVSyncCount = SystemSetting.Instance.GetVSyncCount();
            switch (currentVSyncCount)
            var gameFrame = SystemSetting.Instance.GetGameFps();
            if (gameFrame == GameFps.Half)
            {
                case 1:
                    SystemSetting.Instance.SetVSyncCount(2);
                    break;
                case 2:
                    SystemSetting.Instance.SetVSyncCount(1);
                    break;
                default:
                    break;
                SystemSetting.Instance.SetGameFps(GameFps.Full);
            }
            else
            {
                SystemSetting.Instance.SetGameFps(GameFps.Half);
            }
        }
        private void OnSwitchVSyncCount()
        private void OnSwitchGameFrame()
        {
            m_SixtyFrame.isOn = SystemSetting.Instance.GetVSyncCount() == 1;
            m_SixtyFrame.isOn = SystemSetting.Instance.GetGameFps() == GameFps.Full;
        }
        private void OnShowOrHideOtherPlayers(bool _value)