using NewHorizons.External.Modules.Audio;
using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace NewHorizons.External.Modules.Volumes
{
[JsonObject]
public class AudioVolumeInfo : PriorityVolumeInfo
{
///
/// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
///
public string audio;
[DefaultValue("random")] public ClipSelectionType clipSelection = ClipSelectionType.RANDOM;
///
/// The audio track of this audio volume
///
[DefaultValue("environment")] public AudioMixerTrackName track = AudioMixerTrackName.Environment;
///
/// Whether to loop this audio while in this audio volume or just play it once
///
[DefaultValue(true)] public bool loop = true;
///
/// The loudness of the audio
///
[Range(0f, 1f)]
[DefaultValue(1f)]
public float volume = 1f;
///
/// How long it will take to fade this sound in and out when entering/exiting this volume.
///
[DefaultValue(2f)]
public float fadeSeconds = 2f;
///
/// Play the sound instantly without any fading.
///
public bool noFadeFromBeginning;
///
/// Randomize what time the audio starts at.
///
public bool randomizePlayhead;
///
/// Pause the music when exiting the volume.
///
public bool pauseOnFadeOut;
}
}