コード例 #1
0
        static public DragTriggerListener Get(GameObject go)
        {
            DragTriggerListener listener = go.GetComponent <DragTriggerListener>();

            if (listener == null)
            {
                listener = go.AddComponent <DragTriggerListener>();
            }
            return(listener);
        }
コード例 #2
0
        public static void BindDragEndEvent(GameObject obj, LuaFunction luafunc)
        {
            if (obj == null || luafunc == null)
            {
                return;
            }
            DragTriggerListener listener = DragTriggerListener.Get(obj);

            if (listener != null)
            {
                listener.onDragEnd = luafunc;
            }
        }