static public DragTriggerListener Get(GameObject go) { DragTriggerListener listener = go.GetComponent <DragTriggerListener>(); if (listener == null) { listener = go.AddComponent <DragTriggerListener>(); } return(listener); }
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; } }