// 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(); }
public static void PlaySFX(AudioSource audioSource, AudioClip audioClip, bool forcePlay = true) { if (audioSource == null || audioClip == null) { return; } audioSource.volume = SettingsUtil.GetSFXVolume() / 100; audioSource.loop = false; PlayAudio(audioSource, audioClip, forcePlay); }