From a0ede150686a218c92b901b1f20aef12a9913890 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 14 九月 2018 09:36:59 +0800
Subject: [PATCH] 1930【1.0.15】【主干】功能预告跳转八卦炉激活,功能预告界面未关闭
---
System/SystemSetting/SystemSetting.cs | 63 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/System/SystemSetting/SystemSetting.cs b/System/SystemSetting/SystemSetting.cs
index bf704ad..866daa4 100644
--- a/System/SystemSetting/SystemSetting.cs
+++ b/System/SystemSetting/SystemSetting.cs
@@ -11,7 +11,6 @@
const string QUALITY_LEVEL_KEY = "GameQualityLevel";
const string SOUND_VOLUME_KEY = "SoundRatioKey"; //闊充箰
const string SOUND_EFFECT_KEY = "SoundEffect"; //闊虫晥
- const string FPS_KEY = "FPSKey";
const string GAMEFRAME_KEY = "GameFrameSetting";//鍨傜洿鍚屾鐜�
public Dictionary<SystemSwitch, bool> systemSettings = new Dictionary<SystemSwitch, bool>();
@@ -54,19 +53,19 @@
return LocalSave.GetFloat(SOUND_EFFECT_KEY, 1);
}
- public void SetGameFrame(GameFrame _frame)
+ public void SetGameFps(GameFps _frame)
{
LocalSave.SetInt(GAMEFRAME_KEY, (int)_frame);
- SetFPSLimit((int)_frame);
+ Application.targetFrameRate = Mathf.Clamp((int)_frame, 30, 60);
if (gameFrameChangeEvent != null)
{
gameFrameChangeEvent();
}
}
- public GameFrame GetGameFrame()
+ public GameFps GetGameFps()
{
- return (GameFrame)LocalSave.GetInt(GAMEFRAME_KEY, (int)GameFrame.FullFrame);
+ return (GameFps)LocalSave.GetInt(GAMEFRAME_KEY, (int)GameFps.Full);
}
public void SetSystemSettingSwitch(SystemSwitch type, bool _value)
@@ -143,13 +142,13 @@
switch (_quality)
{
case GameQuality.Low:
- Shader.globalMaximumLOD = 250;
+ Shader.globalMaximumLOD = 300;
Shader.DisableKeyword("QUALITY_HGH");
Shader.DisableKeyword("QUALITY_MED");
Shader.EnableKeyword("QUALITY_LOW");
break;
case GameQuality.Medium:
- Shader.globalMaximumLOD = 250;
+ Shader.globalMaximumLOD = 300;
Shader.DisableKeyword("QUALITY_HGH");
Shader.EnableKeyword("QUALITY_MED");
Shader.DisableKeyword("QUALITY_LOW");
@@ -191,18 +190,18 @@
{
var defaultQuality = GameQuality.High;
-// if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.5f * 1024)
-// {
-// defaultQuality = GameQuality.High;
-// }
-// else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
-// {
-// defaultQuality = GameQuality.Medium; ;
-// }
-// else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
-// {
-// defaultQuality = GameQuality.Low;
-// }
+ // if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.5f * 1024)
+ // {
+ // defaultQuality = GameQuality.High;
+ // }
+ // else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
+ // {
+ // defaultQuality = GameQuality.Medium; ;
+ // }
+ // else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
+ // {
+ // defaultQuality = GameQuality.Low;
+ // }
return (GameQuality)LocalSave.GetInt(QUALITY_LEVEL_KEY, (int)defaultQuality);
}
@@ -217,15 +216,7 @@
}
}
- public void SetFPSLimit(int _fps)
- {
- Application.targetFrameRate = Mathf.Clamp(_fps, 30, 60);
- }
- public int GetFPSLimit()
- {
- return (int)GetGameFrame();
- }
public void LetFPSUnLimit()
{
@@ -236,6 +227,18 @@
{
systemSettings.Clear();
m_PlayerSyncCount = -1;
+ }
+
+ private GameFps GetRecommendFps()
+ {
+ if (Screen.width * Screen.height > (1920 * 1080 + 10000))
+ {
+ return GameFps.Half;
+ }
+ else
+ {
+ return GameFps.Full;
+ }
}
IEnumerator Co_WaitFewMinute()
@@ -266,9 +269,9 @@
High = 2,
}
-public enum GameFrame
+public enum GameFps
{
Free = -1,
- HalfFrame = 30,
- FullFrame = 60,
+ Half = 30,
+ Full = 60,
}
\ No newline at end of file
--
Gitblit v1.8.0