public INetworkMessageSerializer GetRpcMessageSerializer() { ISerializeInfo[] _serializeInfo = new ISerializeInfo[1]; _serializeInfo[0] = new ProtoBufSerializeInfo <Apc>(Apc.Parser); INetworkMessageSerializer _defaultSerializer = new NetworkMessageSerializer(new AppMessageTypeInfo(_serializeInfo)); return(_defaultSerializer); }
public void Write(ISerializeInfo serializeInfo, MemoryStream _stream, BinaryFileAppender _fileAppender) { _stream.Seek(0, SeekOrigin.Begin); serializeInfo.Serialize(_stream, MessageBody); long lenght = _stream.Position; _fileAppender.Write((int)Stage); _fileAppender.Write((int)ProcessSeq); _fileAppender.Write((int)ChannelId); _fileAppender.Write((int)MessageType); _fileAppender.Write((int)lenght); _fileAppender.Write(_stream); //_logger.InfoFormat("Write:{0}, {1} ,{2} ",this, lenght, _fileAppender.Offset); _stream.Position = 0; }
public void EnumAttributes(ISerializeInfo info) { int version = VERSION; info.SerializeInt(ref version); if (version != VERSION) { throw new NotImplementedException("bad version number " + version); } info.SerializeFloat(ref time_step); info.SerializeObjsArray(ref frames); info.SerializeObjsArray(ref materials); info.SerializeObjsArray(ref meshes); info.SerializeObjsArray(ref gameobjects); }
public void EnumAttributes(ISerializeInfo info) { info.SerializeFloatArray(ref vertices); info.SerializeFloatArray(ref normals); info.SerializeObjsArray(ref submeshes); }
public void EnumAttributes(ISerializeInfo info) { info.SerializeFloatArray(ref color); }
public void EnumAttributes(ISerializeInfo info) { info.SerializeFloatArray(ref tr); info.SerializeInt(ref mesh); info.SerializeIntArray(ref mats); }
public void EnumAttributes(ISerializeInfo info) { info.SerializeIntArray(ref destroy_meshes); info.SerializeFloatArray(ref head_ctrls); info.SerializeIntArray(ref go); }
public void EnumAttributes(ISerializeInfo info) { info.SerializeInt(ref topology); info.SerializeIntArray(ref indices); }