Exemplo n.º 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;
 }
Exemplo n.º 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);
 }