using Newtonsoft.Json;
using RhythmBase.Components;
namespace RhythmBase.Events
{
///
/// Represents an event that calls a custom method.
///
public partial class CallCustomMethod : BaseEvent
{
///
/// Initializes a new instance of the class.
///
public CallCustomMethod() { }
///
/// Gets or sets the name of the method to be called.
///
public string MethodName { get; set; } = "";
///
/// Gets or sets the execution time of the method.
///
public ExecutionTimeOptions ExecutionTime { get; set; }
///
/// Gets or sets the sort offset for the event.
///
public int SortOffset { get; set; }
///
public override EventType Type { get; } = EventType.CallCustomMethod;
///
[JsonIgnore]
public RDRoom Rooms { get; set; } = RDRoom.Default();
///
public override Tabs Tab { get; } = Tabs.Actions;
///
public override string ToString() => base.ToString() + $" {MethodName}";
///
/// Specifies the execution time options for the method.
///
public enum ExecutionTimeOptions
{
///
/// Execute the method on prebar.
///
OnPrebar,
///
/// Execute the method on bar.
///
OnBar
}
}
}