using Newtonsoft.Json; using RhythmBase.Components; namespace RhythmBase.Events { /// /// Represents an event to play a sound. /// public class PlaySound : BaseEvent { /// /// Initializes a new instance of the class. /// public PlaySound() { Type = EventType.PlaySound; Tab = Tabs.Sounds; } /// /// Gets or sets a value indicating whether the sound is custom. /// public bool IsCustom { get; set; } /// /// Gets or sets the type of the custom sound. /// public CustomSoundTypes CustomSoundType { get; set; } /// /// Gets or sets the audio sound. /// [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public RDAudio? Sound { get; set; } /// /// Gets the type of the event. /// public override EventType Type { get; } /// /// Gets the tab associated with the event. /// public override Tabs Tab { get; } /// /// Returns a string that represents the current object. /// /// A string that represents the current object. public override string ToString() => base.ToString() + $" {(IsCustom ? Sound?.ToString() : CustomSoundType.ToString())}"; /// /// Defines the types of custom sounds. /// public enum CustomSoundTypes { /// /// Cue sound type. /// CueSound, /// /// Music sound type. /// MusicSound, /// /// Beat sound type. /// BeatSound, /// /// Hit sound type. /// HitSound, /// /// Other sound type. /// OtherSound } } }