Ejemplo n.º 1
0
    static int set_getcopyCallback(IntPtr L)
    {
        object o = null;

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

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

            obj.getcopyCallback = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index getcopyCallback on a nil value" : e.Message));
        }
    }
Ejemplo n.º 2
0
    static int getCopy(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            YX_APIManage             obj  = (YX_APIManage)ToLua.CheckObject(L, 1, typeof(YX_APIManage));
            YX_APIManage.getCopyCall arg0 = null;
            LuaTypes funcType2            = LuaDLL.lua_type(L, 2);

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

            obj.getCopy(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 3
0
    static int get_getcopyCallback(IntPtr L)
    {
        object o = null;

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