コード例 #1
0
    static int writeU64(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2 && L.CheckTypes(1, typeof(clientlib.net.NetMsg), typeof(string)))
        {
            clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
            var arg0 = L.ChkLuaString(2);
            clientlib.net.INetMsg o = obj.writeU64(arg0);
            L.PushLightUserData(o);
            return(1);
        }
        else if (count == 2 && L.CheckTypes(1, typeof(clientlib.net.NetMsg), typeof(long)))
        {
            clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
            var arg0 = L.ToLong(2);
            clientlib.net.INetMsg o = obj.writeU64(arg0);
            L.PushLightUserData(o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: clientlib.net.NetMsg.writeU64");
        }

        return(0);
    }
コード例 #2
0
 static int serialization(IntPtr L)
 {
     L.ChkArgsCount(1);
     clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
     obj.serialization();
     return(0);
 }
コード例 #3
0
    static int createMsg(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            var arg0 = (int)L.ChkNumber(1);
            clientlib.net.NetMsg o = clientlib.net.NetMsg.createMsg(arg0);
            L.PushLightUserData(o);
            return(1);
        }
        else if (count == 2)
        {
            var arg0 = (int)L.ChkNumber(1);
            var arg1 = (int)L.ChkNumber(2);
            clientlib.net.NetMsg o = clientlib.net.NetMsg.createMsg(arg0, arg1);
            L.PushLightUserData(o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: clientlib.net.NetMsg.createMsg");
        }

        return(0);
    }
コード例 #4
0
    static int readInt(IntPtr L)
    {
        L.ChkArgsCount(1);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        int o = obj.readInt();

        L.PushInteger(o);
        return(1);
    }
コード例 #5
0
    static int readString(IntPtr L)
    {
        L.ChkArgsCount(1);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        string o = obj.readString();

        L.PushString(o);
        return(1);
    }
コード例 #6
0
    static int readDouble(IntPtr L)
    {
        L.ChkArgsCount(1);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        double o = obj.readDouble();

        L.PushNumber(o);
        return(1);
    }
コード例 #7
0
    static int reset(IntPtr L)
    {
        L.ChkArgsCount(2);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        var arg0 = (int)L.ChkNumber(2);

        obj.reset(arg0);
        return(0);
    }
コード例 #8
0
    static int createReadMsg(IntPtr L)
    {
        L.ChkArgsCount(1);
        var arg0 = (int)L.ChkNumber(1);

        clientlib.net.NetMsg o = clientlib.net.NetMsg.createReadMsg(arg0);
        L.PushLightUserData(o);
        return(1);
    }
コード例 #9
0
    static int writeInt(IntPtr L)
    {
        L.ChkArgsCount(2);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        var arg0 = (int)L.ChkNumber(2);

        clientlib.net.INetMsg o = obj.writeInt(arg0);
        L.PushLightUserData(o);
        return(1);
    }
コード例 #10
0
    static int writeString(IntPtr L)
    {
        L.ChkArgsCount(2);
        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)L.ChkUserDataSelf(1, "clientlib.net.NetMsg");
        var arg0 = L.ToLuaString(2);

        clientlib.net.INetMsg o = obj.writeString(arg0);
        L.PushLightUserData(o);
        return(1);
    }
コード例 #11
0
    static int get_readSize(IntPtr L)
    {
        object o = L.ToUserData(1);

        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name readSize");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index readSize on a nil value");
            }
        }

        L.PushInteger(obj.readSize);
        return(1);
    }
コード例 #12
0
    static int set_type(IntPtr L)
    {
        object o = L.ToUserData(1);

        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name type");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index type on a nil value");
            }
        }

        obj.type = (int)L.ChkNumber(3);
        return(0);
    }
コード例 #13
0
    static int get_buffer(IntPtr L)
    {
        object o = L.ToUserData(1);

        clientlib.net.NetMsg obj = (clientlib.net.NetMsg)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name buffer");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index buffer on a nil value");
            }
        }

        L.PushLightUserData(obj.buffer);
        return(1);
    }