Example #1
0
 /// <summary>
 ///   Registers the passed callback for events with the specified key.
 /// </summary>
 /// <param name="eventKey">Key of the events to register to callback for.</param>
 /// <param name="callback">Callback to register.</param>
 protected void SetEventListener(object eventKey, EventManager.EventDelegate callback)
 {
     this.events.Add(eventKey, callback);
 }
 /// <summary>
 ///   Registers for the specified event at any future FreudBot games that might start.
 /// </summary>
 /// <param name="eventType">Type of the event to register for.</param>
 /// <param name="callback">Method to call when the event is raised.</param>
 protected void RegisterListener(object eventType, EventManager.EventDelegate callback)
 {
     this.events.Add(eventType, callback);
 }
 /// <summary>
 ///   Sets the passed callback for events with the specified key.
 ///   The callback will automatically be added on enable, and removed on disable.
 /// </summary>
 /// <param name="eventKey">Key of events to set the callback for.</param>
 /// <param name="callback">Callback to automatically add on enable, and remove on disable.</param>
 protected virtual void SetListener(object eventKey, EventManager.EventDelegate callback)
 {
     this.listeners.Add(eventKey, callback);
 }
Example #4
0
 static public void RemoveListener <T>(EventManager.EventDelegate <T> del) where T : BaseEventData, new()
 {
     Instance.eventMan.RemoveListener <T>(del);
 }
Example #5
0
 public InvokeInfo(EventManager.EventDelegate eventDelegate)
 {
     target = eventDelegate.Target;
     method = eventDelegate.Method;
 }