예제 #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>
 /// Stops all audio files.
 /// </summary>
 public static void StopAll()
 {
     _audioPlayer.StopAll();
 }