protected override void Awake() { base.Awake(); enable = new RegisterBoolParameter("AudioManagerEnable", true); masterVolumeSettings = new MasterVolumeSettings(); foreach (var p in preloadAudioClipNames) { GetAudioClip(p); } }
protected override void Awake() { base.Awake(); AudioEnable = new RegisterBoolParameter(SaveKeyName.EnableSound, true); MasterVolume = new RegisterFloatParameter("MasterVolume", 1.0f); MasterSEVolume = new RegisterFloatParameter("MasterSEVolume", 1.0f); MasterBGMVolume = new RegisterFloatParameter("MasterBGMVolume", 1.0f); MasterBGMVolume.OnValueChanged.AddListener((volume) => { loopAudioSource.volume = volume; }); }
public AudioVolumeSetting(string id, float defaultValue = 1.0f) { volume = new RegisterFloatParameter(id + "Volume", defaultValue); enable = new RegisterBoolParameter(id + "Enable", true); }
public MyVibrationManager() { enable = new RegisterBoolParameter("VibrationEnable", true); SetEnable(enable.GetValue()); }
public AudioVolumeSetting(AudioVolumeSettingType type, float defaultValue = 1.0f) { Type = type; volume = new RegisterFloatParameter(type.ToString() + "Volume", defaultValue); mute = new RegisterBoolParameter(type.ToString() + "Mute", false); }