Exemplo n.º 1
0
        public static void RemoveMonoEventContext(GameObject gameObject)
        {
            MonoEventContext c = null;

            if (s_MonoEventContexts.TryGetValue(gameObject, out c))
            {
                c.enable = false;
                s_MonoEventContexts.Remove(gameObject);
                s_MonoEventContextPool.Release(c);
            }
        }
Exemplo n.º 2
0
        public static MonoEventContext GetMonoEventContext(GameObject gameObject)
        {
            MonoEventContext c = null;

            if (!s_MonoEventContexts.TryGetValue(gameObject, out c))
            {
                c        = s_MonoEventContextPool.Get();
                c.target = gameObject;
                s_MonoEventContexts[gameObject] = c;
            }
            return(c);
        }