using Newtonsoft.Json; using RhythmBase.Components; using RhythmBase.Components.Easing; namespace RhythmBase.Events { /// /// Represents an event that tints rows with specified colors and effects. /// public class TintRows : BaseRowAnimation, IEaseEvent { /// /// Initializes a new instance of the class. /// public TintRows() { TintColor = new PaletteColor(true); BorderColor = new PaletteColor(true); Type = EventType.TintRows; Tab = Tabs.Actions; } /// /// Gets or sets the tint color. /// [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public PaletteColor TintColor { get; set; } /// /// Gets or sets the easing type for the animation. /// public EaseType Ease { get; set; } /// /// Gets or sets the border style. /// public Borders Border { get; set; } /// /// Gets or sets the border color. /// [EaseProperty] public PaletteColor BorderColor { get; set; } /// /// Gets or sets the opacity level. /// [EaseProperty] public int Opacity { get; set; } /// /// Gets or sets a value indicating whether to apply tint. /// public bool Tint { get; set; } /// /// Gets or sets the duration of the tint effect. /// public float Duration { get; set; } /// /// Gets or sets the row effect. /// public RowEffect Effect { get; set; } /// /// Gets the event type. /// public override EventType Type { get; } /// /// Gets the tab category. /// public override Tabs Tab { get; } /// /// Gets a value indicating whether to tint all rows. /// [JsonIgnore] public bool TintAll { get { return Parent != null; } } /// /// Returns a string that represents the current object. /// /// A string that represents the current object. public override string ToString() => base.ToString() + string.Format(" {0}{1}", Border, (Border == Borders.None) ? "" : (":" + BorderColor.ToString())); /// /// Specifies the row effects. /// public enum RowEffect { /// /// No effect. /// None, /// /// Electric effect. /// Electric, /// /// Smoke effect. /// Smoke } } }