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. /// Most of the time you'll use environment (the default) for sound effects and music for music. /// [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; } }