设置分组

This commit is contained in:
bob
2025-06-10 14:57:35 +08:00
parent 1d3d4adbf5
commit 9963e4a51e
144 changed files with 8755 additions and 70 deletions

View File

@@ -0,0 +1,26 @@
using NBC;
namespace NBF.Setting
{
[Sort(2)]
public class PlayerVolumeSetting : RangeOption
{
public override string Name => "PlayerVolume";
public override string Group => SettingsDef.Group.Sound;
public override string Tab => SettingsDef.Tab.SoundAndLanguage;
public override int MinValue => 0;
public override int MaxValue => 100;
protected override int DefaultValue => 100;
protected override void OnInitialize()
{
SetValue(10);
}
protected override void OnApply()
{
SoundManager.Inst.SetVolume(AudioChannelType.Player, GetValue() / 100f);
}
}
}