예제 #1
0
    public static InputEndDragRegisterInfo GetOnEndDragListener(DragAcceptor acceptor, string UIName, string ComponentName, string parm, InputEventHandle <InputUIOnEndDragEvent> callback)
    {
        InputEndDragRegisterInfo info = HeapObjectPool <InputEndDragRegisterInfo> .GetObject();

        info.eventKey    = InputUIOnEndDragEvent.GetEventKey(UIName, ComponentName);
        info.callBack    = callback;
        info.m_acceptor  = acceptor;
        info.m_OnEndDrag = (data) =>
        {
            DispatchEndDragEvent(UIName, ComponentName, parm, data);
        };

        return(info);
    }
예제 #2
0
    public DragAcceptor GetDragComp(string name)
    {
        if (m_dragList.ContainsKey(name))
        {
            return(m_dragList[name]);
        }

        DragAcceptor tmp = GetGameObject(name).GetComponent <DragAcceptor>();

        if (tmp == null)
        {
            throw new Exception(m_EventNames + " GetDragComp ->" + name + "<- is Null !");
        }

        m_dragList.Add(name, tmp);
        return(tmp);
    }