From f237dce65b7eb454dfc9e2fe6c8efdebca085b4e Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 11 九月 2018 14:13:07 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/SystemSetting/SystemSetWin.cs | 34 ++++++++++++++++------------------
1 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/System/SystemSetting/SystemSetWin.cs b/System/SystemSetting/SystemSetWin.cs
index 35b357c..37d4d9d 100644
--- a/System/SystemSetting/SystemSetWin.cs
+++ b/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,7 +182,7 @@
SystemSetting.Instance.SetQualityLevel(GameQuality.Low);
if (isInited)
{
- SystemSetting.Instance.SetVSyncCount(2);
+ SystemSetting.Instance.SetGameFps(GameFps.Half);
SystemSetting.Instance.SetPlayerSyncCount(5);
}
}
@@ -190,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)
--
Gitblit v1.8.0