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

        FromPB(pb);
        return(true);
    }
Exemple #2
0
 //从Protobuffer类型初始化
 public void FromPB(HumanRpcStopMoveAsk v)
 {
     if (v == null)
     {
         return;
     }
     m_Dir = v.Dir;
     m_X   = v.X;
     m_Z   = v.Z;
 }
Exemple #3
0
    //转化成Protobuffer类型函数
    public HumanRpcStopMoveAsk ToPB()
    {
        HumanRpcStopMoveAsk v = new HumanRpcStopMoveAsk();

        v.Dir = m_Dir;
        v.X   = m_X;
        v.Z   = m_Z;

        return(v);
    }