Files
Fishing2/Assets/Scripts/Model/Common/Services/Settings/Options/Sound/PlayerVolumeSetting.cs
2025-08-29 09:11:08 +08:00

26 lines
695 B
C#

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);
}
}
}