public static void UnregisterEvent(EDelayType p_delayType, EEventType p_eventType, EventHandler p_delegate)
 {
     if (p_delegate != null)
     {
         s_eventMap[(Int32)p_delayType][(Int32)p_eventType].Remove(p_delegate);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Returns true if the virtual button with the given name was pressed this frame
 /// </summary>
 public bool GetButtonDown(string virtualKey, EDelayType delayType = EDelayType.None, bool ignoreIgnore = false)
 {
     if (GameManager.Instance.Frame == 0)
     {
         return(false);
     }
     return((!IgnoreInput || ignoreIgnore) && f_inputManager.GetButtonDown(virtualKey, delayType));
 }
        public static void InvokeEvent(EDelayType p_delayType, EEventType p_eventType, Object p_sender, EventArgs p_eventArgs)
        {
            List <EventHandler> list = s_eventMap[(Int32)p_delayType][(Int32)p_eventType];

            for (Int32 i = 0; i < list.Count; i++)
            {
                try
                {
                    list[i](p_sender, p_eventArgs);
                }
                catch (Exception exception)
                {
                    Debug.LogException(exception);
                }
            }
        }