예제 #1
0
        /// <summary>
        /// Plays the specified music track.
        /// If another track is currently playing it will be stopped.
        /// </summary>
        /// <param name="path">Audio file path in Resources folder</param>
        /// <param name="options">Audio options</param>
        public static void Play(string path, AudioOptions options = null)
        {
            if (_audioPlayer.IsPlaying(path))
            {
                return;
            }

            _audioPlayer.StopAll();
            _audioPlayer.Play(path, options);
        }
예제 #2
0
파일: Sound.cs 프로젝트: Playspal/TextQuest
 /// <summary>
 /// Plays the specified audio file.
 /// </summary>
 /// <param name="path">Audio file path in Resources folder</param>
 /// <param name="options">Audio options</param>
 public static void Play(string path, AudioOptions options = null)
 {
     _audioPlayer.Play(path, options);
 }