//Protobuffer从MemoryStream进行反序列化 public bool FromMemoryStream(MemoryStream protoMS) { HumanRpcStopMoveAsk pb = ProtoBuf.Serializer.Deserialize <HumanRpcStopMoveAsk>(protoMS); FromPB(pb); return(true); }
//从Protobuffer类型初始化 public void FromPB(HumanRpcStopMoveAsk v) { if (v == null) { return; } m_Dir = v.Dir; m_X = v.X; m_Z = v.Z; }
//转化成Protobuffer类型函数 public HumanRpcStopMoveAsk ToPB() { HumanRpcStopMoveAsk v = new HumanRpcStopMoveAsk(); v.Dir = m_Dir; v.X = m_X; v.Z = m_Z; return(v); }