static int set_onDragEnd(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.DragListener obj = (UI.DragListener)o; System.Action <UnityEngine.EventSystems.PointerEventData> arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (System.Action <UnityEngine.EventSystems.PointerEventData>)ToLua.CheckObject(L, 2, typeof(System.Action <UnityEngine.EventSystems.PointerEventData>)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(System.Action <UnityEngine.EventSystems.PointerEventData>), func) as System.Action <UnityEngine.EventSystems.PointerEventData>; } obj.onDragEnd = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onDragEnd on a nil value" : e.Message)); } }
void CheckDragListener() { DragListener l = this.GetComponent <DragListener>(); if (l != null) { return; } l = this.gameObject.AddComponentIfNoExist <DragListener>(); l.onDragBegin = OnBeginDrag; l.onDrag = OnDrag; l.onDragEnd = OnEndDrag; }
static int OnEndDrag(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UI.DragListener obj = (UI.DragListener)ToLua.CheckObject(L, 1, typeof(UI.DragListener)); UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData)); obj.OnEndDrag(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_onDragEnd(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.DragListener obj = (UI.DragListener)o; System.Action <UnityEngine.EventSystems.PointerEventData> ret = obj.onDragEnd; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onDragEnd on a nil value" : e.Message)); } }