public virtual EventConnection Connect(int priority, LocalEventHandler handler) { var connection = new EventConnection(this, handler, priority); subscriptions.Add(connection); subscriptions.Sort((a, b) => a.Priority - b.Priority); return(connection); }
public EventConnection(LocalEvent <T> evt, LocalEventHandler handler, int priority) { Event = evt; Handler = handler; Priority = priority; }
public virtual EventConnection Connect(LocalEventHandler handler) { return(Connect(0, handler)); }
public void SetTarget(GameObject ob) { eventHandler = ob.GetComponent <LocalEventHandler>(); }