static int AddDragEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIEventListener obj = (UIEventListener)ToLua.CheckObject(L, 1, typeof(UIEventListener)); UIEventListener.VectorDelegate arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (UIEventListener.VectorDelegate)ToLua.CheckObject(L, 2, typeof(UIEventListener.VectorDelegate)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(UIEventListener.VectorDelegate), func) as UIEventListener.VectorDelegate; } obj.AddDragEvent(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }