Beispiel #1
0
    //Protobuffer从MemoryStream进行反序列化
    public bool FromMemoryStream(MemoryStream protoMS)
    {
        LoginRpcSelectCharacterAsk pb = ProtoBuf.Serializer.Deserialize <LoginRpcSelectCharacterAsk>(protoMS);

        FromPB(pb);
        return(true);
    }
Beispiel #2
0
 //从Protobuffer类型初始化
 public void FromPB(LoginRpcSelectCharacterAsk v)
 {
     if (v == null)
     {
         return;
     }
     m_RoleId = v.RoleId;
 }
Beispiel #3
0
    //转化成Protobuffer类型函数
    public LoginRpcSelectCharacterAsk ToPB()
    {
        LoginRpcSelectCharacterAsk v = new LoginRpcSelectCharacterAsk();

        v.RoleId = m_RoleId;

        return(v);
    }