コード例 #1
0
 // 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();
 }
コード例 #2
0
ファイル: AudioUtil.cs プロジェクト: andrewwongdgnt/CocoBlitz
 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);
 }