예제 #1
0
 /// <summary>
 /// Gets the list of CommandScripts that handle an event currently.
 /// </summary>
 /// <param name="_event">The event to get the handlers for.</param>
 /// <returns>The list of handlers.</returns>
 public static List<KeyValuePair<int, CommandScript>> GetHandlers(ScriptEvent _event)
 {
     if (_event == null)
     {
         return new List<KeyValuePair<int, CommandScript>>();
     }
     return _event.Handlers;
 }
예제 #2
0
 /// <summary>
 /// Registers a script event to the system.
 /// </summary>
 /// <param name="newevent">The event to register.</param>
 public void RegisterEvent(ScriptEvent newevent)
 {
     Events.Add(newevent.Name, newevent);
 }