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