protected override void fetchReferences() { base.fetchReferences(); audioController = AudioController.Instance; dataController = PPDataController.GetInstance; musicSlider.value = SettingsUtil.GetMusicVolume(); sfxToggle.value = Global.BoolToInt(!SettingsUtil.SFXMuted); }
// Use this for initialization void Start() { cardDelay.value = SettingsUtil.GetCardDelay() * 4; musicVolume.value = SettingsUtil.GetMusicVolume(); sfxVolume.value = SettingsUtil.GetSFXVolume(); penalties.isOn = SettingsUtil.IsPenaltiesAllowed(); negativeScores.isOn = SettingsUtil.IsNegativeScoresAllowed(); }
private IEnumerator FadeInBackgroundMusicInternal() { while (musicSource.volume < SettingsUtil.GetMusicVolume() / 100) { musicSource.volume += 0.1f; yield return(new WaitForSecondsRealtime(0.1f)); } musicSource.volume = SettingsUtil.GetMusicVolume() / 100; }
public static void PlayMusic(AudioSource audioSource, AudioClip audioClip, AudioClip audioClip2 = null, MonoBehaviour mb = null) { if (audioSource == null || audioClip == null) { return; } audioSource.volume = SettingsUtil.GetMusicVolume() / 100; audioSource.loop = audioClip2 == null; PlayAudio(audioSource, audioClip); if (audioClip2 != null) { mb.StartCoroutine(WaitForMusic1ToEnd(audioSource, audioClip2)); } }
public void UpdateMusicVolume() { musicSource.volume = SettingsUtil.GetMusicVolume() / 100; }