IPlayerSettings
namespace Griff.Runtime;
public interface IPlayerSettingsA system that keeps settings a player chooses for themselves, as the game keeps its own (volume, full screen, the offsets): they’re read back from SaveData as the game starts and written as they change, and a Slider or Toggle set to one shows and sets it. The Rhythm module keeps a player’s note speed this way, and the Visual Novels module how they like dialogue skipped and read on.
Methods
Section titled “Methods”ApplySetting
Section titled “ApplySetting”public abstract bool ApplySetting(GameSetting setting, float value)Sets a setting this system keeps, from a slider or toggle; false if it keeps no such setting.
InOwnUnits
Section titled “InOwnUnits”public abstract bool InOwnUnits(GameSetting setting)True for a setting with units of its own (how many times as fast notes come), which is a slider’s value; the rest, from 0 to 1, fill it.
LoadSettings
Section titled “LoadSettings”public abstract void LoadSettings(SaveData data)Reads the settings saved earlier from data; those never saved are left as they are.
SaveSettings
Section titled “SaveSettings”public abstract void SaveSettings(SaveData data, bool now)Writes to data whichever settings changed since they were last written, each step; with now (as the game quits), also what it otherwise writes only now and then.
SettingValue
Section titled “SettingValue”public abstract float? SettingValue(GameSetting setting)The setting’s value as a slider or toggle shows it, or null if it isn’t one this system keeps.