public virtual IEventConnection Connect(int priority, GenericNetworkEventHandler handler)
    {
        var connection = new NetworkEventConnection(this, handler, priority);

        subscriptions.Add(connection);
        subscriptions.Sort((a, b) => a.Priority - b.Priority);
        return(connection);
    }
 public virtual void Connect(GenericNetworkEventHandler handler)
 {
     subscriptions.Add(handler);
 }
 public NetworkEventConnection(InstancedNetworkEventBase <T> evt, GenericNetworkEventHandler handler, int priority)
 {
     Event    = evt;
     Handler  = handler;
     Priority = priority;
 }
 public virtual IEventConnection Connect(GenericNetworkEventHandler handler)
 {
     return(Connect(0, handler));
 }
Esempio n. 5
0
 public NetworkEventConnection(GenericNetworkEvent <T> evt, GenericNetworkEventHandler handler, int priority)
 {
     Event    = evt;
     Handler  = handler;
     Priority = priority;
 }