帧率修改

dev_chengFeng
jiaoyangna 2021-07-01 15:15:15 +08:00
parent e7544da64e
commit 5e02167ef9
1 changed files with 13 additions and 11 deletions

View File

@ -82,17 +82,19 @@ function SettingInfo:SetTipShow()
end
function SettingInfo:SetReslutionTipShow()
local value = PlayerPrefs.GetInt("ResLution")
this.selectResolution.value = value
if value == 0 then
UnityEngine.Application.targetFrameRate = 30;
this.selectResolutionText.text = "普通帧率"
this.selectResolutionTip.gameObject:SetActive(false)
else
UnityEngine.Application.targetFrameRate = 60;
this.selectResolutionText.text = "高帧率"
this.selectResolutionTip.gameObject:SetActive(true)
end
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.IS_SELECT_RESLUTION) then
local value = PlayerPrefs.GetInt("ResLution")
this.selectResolution.value = value
if value == 0 then
UnityEngine.Application.targetFrameRate = 30;
this.selectResolutionText.text = "普通帧率"
this.selectResolutionTip.gameObject:SetActive(false)
else
UnityEngine.Application.targetFrameRate = 60;
this.selectResolutionText.text = "高帧率"
this.selectResolutionTip.gameObject:SetActive(true)
end
end
end
--绑定事件(用于子类重写)