public static void readLoop(MemoryStream msdata, List <PRoomRole> p) { int Len = proto_util.readShort(msdata); for (int i = 0; i < Len; i++) { PRoomRole _pm = new PRoomRole(); _pm.read(msdata); p.Add(_pm); } }
public void write(MemoryStream msdata) { proto_util.writeUInt(msdata, roomUid); proto_util.writeUInt(msdata, roomType); PRoomRole.writeLoop(msdata, roleList); proto_util.writeUByte(msdata, roomState); proto_util.writeUByte(msdata, curPlayCount); proto_util.writeUByte(msdata, piao); proto_util.writeUByte(msdata, playCount); proto_util.writeUByte(msdata, playType); proto_util.writeUInt(msdata, ownerId); }
public void read(MemoryStream msdata) { roomUid = proto_util.readUInt(msdata); roomType = proto_util.readUInt(msdata); PRoomRole.readLoop(msdata, roleList); roomState = proto_util.readUByte(msdata); curPlayCount = proto_util.readUByte(msdata); piao = proto_util.readUByte(msdata); playCount = proto_util.readUByte(msdata); playType = proto_util.readUByte(msdata); ownerId = proto_util.readUInt(msdata); }