Beispiel #1
0
        public static void RemoveHook(Type type, ComponentHook hook)
        {
            ComponentHook all;

            if (Hooks.TryGetValue(type, out all))
            {
                all        -= hook;
                Hooks[type] = all;
            }
        }
Beispiel #2
0
        public static void AddHook(Type type, ComponentHook hook)
        {
            ComponentHook all;

            if (Hooks.TryGetValue(type, out all))
            {
                all += hook;
            }
            else
            {
                all = hook;
            }
            Hooks[type] = all;
        }
Beispiel #3
0
 public static void RemoveHook <T>(ComponentHook hook) where T : Component
 {
     RemoveHook(typeof(T), hook);
 }
Beispiel #4
0
 public static void AddHook <T>(ComponentHook hook) where T : Component
 {
     AddHook(typeof(T), hook);
 }