using NewHorizons.External.SerializableEnums; using Newtonsoft.Json; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace NewHorizons.External.Modules.Volumes.VolumeInfos { [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 NHClipSelectionType clipSelection = NHClipSelectionType.RANDOM; /// /// The audio track of this audio volume /// [DefaultValue("environment")] public NHAudioMixerTrackName track = NHAudioMixerTrackName.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; /// /// Whether the audio sounds like it emits from the center of the volume. /// public bool spatialBlend; /// /// If spatialBlend is true, how much does the direction of audio "spread" out from facing the center, between 0 and 180 degrees. /// [Range(0f, 180f)] [DefaultValue(180f)] public float spread = 180f; } }