GamePreferences
Namespace: Murder.Save
Assembly: Murder.dll
public class GamePreferences
Tracks preferences of the current session. This is unique per run. Used to track the game settings that are not tied to any game run (for example, volume).
⭐ Constructors
public GamePreferences()
⭐ Properties
_bloom
protected bool _bloom;
Returns
bool
_downscale
protected bool _downscale;
Returns
bool
_language
protected LanguageId _language;
Returns
LanguageId
_musicVolume
protected float _musicVolume;
Returns
float
_soundVolume
protected float _soundVolume;
Returns
float
Language
public LanguageId Language { get; }
Returns
LanguageId
MusicVolume
public float MusicVolume { get; }
Returns
float
SoundVolume
public float SoundVolume { get; }
Returns
float
⭐ Methods
SaveSettings()
protected void SaveSettings()
ToggleBloomAndSave()
public bool ToggleBloomAndSave()
Returns
bool
ToggleDownscaleAndSave()
public bool ToggleDownscaleAndSave()
Returns
bool
SetMusicVolume(float)
public float SetMusicVolume(float value)
Parameters
value
float
Returns
float
SetSoundVolume(float)
public float SetSoundVolume(float value)
Parameters
value
float
Returns
float
ToggleMusicVolumeAndSave()
public float ToggleMusicVolumeAndSave()
This toggles the volume to the opposite of the current setting. Immediately serialize (and save) afterwards.
Returns
float
ToggleSoundVolumeAndSave()
public float ToggleSoundVolumeAndSave()
This toggles the volume to the opposite of the current setting. Immediately serialize (and save) afterwards.
Returns
float
OnPreferencesChangedImpl()
public virtual void OnPreferencesChangedImpl()
OnPreferencesChanged()
public void OnPreferencesChanged()
SetLanguage(LanguageId)
public void SetLanguage(LanguageId id)
Parameters
id
LanguageId
⚡