Пример #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
 /// <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);
 }