private void AddHandler(string eventID, CallbackEventDelegate raiseMethod, Delegate handler)
        {
            EventInfo info;

            if (_events.TryGetValue(eventID, out info))
            {
                info.Handler = MulticastDelegate.Combine(info.Handler, handler);
            }
            else
            {
                _events[eventID] = new EventInfo(handler, raiseMethod);
            }
        }
Example #2
0
 public DurationCallbackEvent(float duration, CallbackEventDelegate callback)
 {
     this.callback = callback;
     this.duration = duration;
 }
Example #3
0
 public FrameCallbackEvent(float frame, CallbackEventDelegate callback)
 {
     this.callback = callback;
     this.frame    = frame;
 }
Example #4
0
 public void AddCallbackAtDuration(float duration, CallbackEventDelegate callback)
 {
     Add(new DurationCallbackEvent(duration, callback));
 }
Example #5
0
 public void AddCallbackAtFrame(float frame, CallbackEventDelegate callback)
 {
     Add(new FrameCallbackEvent(frame, callback));
 }
Example #6
0
 public void AddCallbackAtEnd(CallbackEventDelegate callback)
 {
     Add(new FrameCallbackEvent(-1.0f /*last frame*/, callback));
 }
Example #7
0
 public DelayCallbackEvent(float delay, CallbackEventDelegate callback)
 {
     this.callback = callback;
     this.delay    = delay;
 }
 public EventInfo(Delegate handler, CallbackEventDelegate raiseMethod)
 {
     Handler     = handler;
     RaiseMethod = raiseMethod;
 }