Esempio n. 1
0
    static int set_delegateNetGameCallBack(IntPtr L)
    {
        object o = null;

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

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

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

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

            obj.setGameTimer(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Esempio n. 3
0
    static int get_delegateNetGameCallBack(IntPtr L)
    {
        object o = null;

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