| | |
| | | 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);
|
| | |
| | | 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('@');
|
| | |
| | |
|
| | | loginModel.accountBindOkEvent += UpdateAccountBindTitle;
|
| | | SDKUtility.Instance.onFreePlatfromDoIDAuthenticationOk += OnAuthenticationOk;
|
| | | SystemSetting.Instance.vSyncCountChangeEvent += OnSwitchVSyncCount;
|
| | | SystemSetting.Instance.gameFrameChangeEvent += OnSwitchGameFrame;
|
| | | SystemSetting.Instance.playerSyncCountChangeEvent += OnPlayerSyncCountChange;
|
| | |
|
| | | isInited = true;
|
| | |
| | | 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);
|
| | | }
|
| | |
| | | SystemSetting.Instance.SetQualityLevel(GameQuality.Low);
|
| | | if (isInited)
|
| | | {
|
| | | SystemSetting.Instance.SetGameFps(GameFps.Half);
|
| | | SystemSetting.Instance.SetPlayerSyncCount(5);
|
| | | }
|
| | | }
|
| | |
| | | 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)
|