示例#1
0
        static void GetChildEventBridges(string strType, GComponent container, List <EventBridge> bridges)
        {
            EventBridge bridge = container.TryGetEventBridge(strType);

            if (bridge != null)
            {
                bridges.Add(bridge);
            }

            int count = container.numChildren;

            for (int i = 0; i < count; ++i)
            {
                GObject obj = container.GetChildAt(i);
                if (obj is GComponent)
                {
                    GetChildEventBridges(strType, (GComponent)obj, bridges);
                }
                else
                {
                    bridge = obj.TryGetEventBridge(strType);
                    if (bridge != null)
                    {
                        bridges.Add(bridge);
                    }
                }
            }
        }
示例#2
0
        static void GetChildEventBridges(string strType, GComponent container, List<EventBridge> bridges)
        {
            EventBridge bridge = container.TryGetEventBridge(strType);
            if (bridge != null)
                bridges.Add(bridge);

            int count = container.numChildren;
            for (int i = 0; i < count; ++i)
            {
                GObject obj = container.GetChildAt(i);
                if (obj is GComponent)
                    GetChildEventBridges(strType, (GComponent)obj, bridges);
                else
                {
                    bridge = obj.TryGetEventBridge(strType);
                    if (bridge != null)
                        bridges.Add(bridge);
                }
            }
        }