static int set_onForwardDrag(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragEventListener obj = (DragEventListener)o;
            DragEventListener.Vector2Delegate arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (DragEventListener.Vector2Delegate)ToLua.CheckObject(L, 2, typeof(DragEventListener.Vector2Delegate));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(DragEventListener.Vector2Delegate), func) as DragEventListener.Vector2Delegate;
            }

            obj.onForwardDrag = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onForwardDrag on a nil value" : e.Message));
        }
    }
Beispiel #2
0
    public static Delegate DragEventListener_Vector2Delegate(LuaFunction func)
    {
        if (func == null)
        {
            DragEventListener.Vector2Delegate fn = delegate { };
            return(fn);
        }

        DragEventListener.Vector2Delegate d = (new DragEventListener_Vector2Delegate_Event(func)).Call;
        return(d);
    }
    static int get_onForwardDrag(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            DragEventListener obj = (DragEventListener)o;
            DragEventListener.Vector2Delegate ret = obj.onForwardDrag;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onForwardDrag on a nil value" : e.Message));
        }
    }