设置相关功能脚本呢

This commit is contained in:
bob
2025-05-30 17:49:12 +08:00
parent e9ad74b3ea
commit dea58270fa
62 changed files with 1164 additions and 476 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
namespace NBF.Setting
{
/// <summary>
/// 垂直同步
/// </summary>
[Sort(4)]
public class VSyncSetting : ToggleOption
{
public override string Name => "VSync";
public override string Group => SettingsDef.Group.Graphic;
protected override bool DefaultValue => false;
protected override void OnApply()
{
//垂直同步
QualitySettings.vSyncCount = GetSelectedOption() ? 1 : 0;
}
protected override void OnReset()
{
SelectOption(DefaultValue);
}
}
}