using Newtonsoft.Json; using RhythmBase.Components; using RhythmBase.Components.Easing; namespace RhythmBase.Events { /// /// Represents an event to set the room perspective. /// public class SetRoomPerspective : BaseEvent, IEaseEvent { private RDPointE?[] cornerPositions= [ new(0,0), new(100,0), new(0,100), new(100,100), ]; /// /// Initializes a new instance of the class. /// public SetRoomPerspective() { Type = EventType.SetRoomPerspective; Tab = Tabs.Rooms; } /// /// Gets or sets the corner positions of the room. /// [EaseProperty] public RDPointE?[] CornerPositions { get => cornerPositions; set => cornerPositions = value.Length == 4?value:throw new RhythmBase.Exceptions.RhythmBaseException(); } /// /// Gets or sets the duration of the event. /// public float Duration { get; set; } /// /// Gets or sets the ease type of the event. /// public EaseType Ease { 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; } /// /// Gets the room associated with the event. /// [JsonIgnore] public RDRoom Room => new RDSingleRoom(checked((byte)Y)); } }