Пример #1
0
 public static void Remove(string message, SteamVR_Utils.Event.Handler action)
 {
     SteamVR_Utils.Event.Handler handler = SteamVR_Utils.Event.listeners[message] as SteamVR_Utils.Event.Handler;
     if (handler != null)
     {
         SteamVR_Utils.Event.listeners[message] = (SteamVR_Utils.Event.Handler)Delegate.Remove(handler, action);
     }
 }
Пример #2
0
 public static void Send(string message, params object[] args)
 {
     SteamVR_Utils.Event.Handler handler = SteamVR_Utils.Event.listeners[message] as SteamVR_Utils.Event.Handler;
     if (handler != null)
     {
         handler(args);
     }
 }
Пример #3
0
 public static void Listen(string message, SteamVR_Utils.Event.Handler action)
 {
     SteamVR_Utils.Event.Handler handler = SteamVR_Utils.Event.listeners[message] as SteamVR_Utils.Event.Handler;
     if (handler != null)
     {
         SteamVR_Utils.Event.listeners[message] = (SteamVR_Utils.Event.Handler)Delegate.Combine(handler, action);
         return;
     }
     SteamVR_Utils.Event.listeners[message] = action;
 }