From 8500ce94ffcb56b566ff12fe024922fab920caf6 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 24 Aug 2021 15:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B8=B8=E6=88=8F=E5=B8=A7=E7=8E=87?= =?UTF-8?q?=E3=80=91=E9=BB=98=E8=AE=A4=E4=BF=AE=E6=94=B9=E4=B8=BA30?= =?UTF-8?q?=E5=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Logic/Game.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Logic/Game.lua b/Assets/ManagedResources/~Lua/Logic/Game.lua index 94b40f27fb..8a73fca7ca 100644 --- a/Assets/ManagedResources/~Lua/Logic/Game.lua +++ b/Assets/ManagedResources/~Lua/Logic/Game.lua @@ -17,6 +17,13 @@ function Game.Initialize() Screen.sleepTimeout = U3d.SleepTimeout.NeverSleep this.GlobalEvent = EventManager.New() this.InitManagers() + -- 默认30帧 + if PlayerPrefs.HasKey("ResLution") then + UnityEngine.Application.targetFrameRate = PlayerPrefs.GetInt("ResLution") == 0 and 30 or 60 + else + UnityEngine.Application.targetFrameRate = 30 + end + -- 延迟 Timer.New(function() UIManager.OpenPanel(UIName.LoginPanel)