예제 #1
0
        public INetworkMessageSerializer GetRpcMessageSerializer()
        {
            ISerializeInfo[] _serializeInfo = new ISerializeInfo[1];
            _serializeInfo[0] = new ProtoBufSerializeInfo <Apc>(Apc.Parser);
            INetworkMessageSerializer _defaultSerializer = new NetworkMessageSerializer(new AppMessageTypeInfo(_serializeInfo));

            return(_defaultSerializer);
        }
예제 #2
0
            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;
            }
예제 #3
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);
        }
예제 #4
0
 public void EnumAttributes(ISerializeInfo info)
 {
     info.SerializeFloatArray(ref vertices);
     info.SerializeFloatArray(ref normals);
     info.SerializeObjsArray(ref submeshes);
 }
예제 #5
0
 public void EnumAttributes(ISerializeInfo info)
 {
     info.SerializeFloatArray(ref color);
 }
예제 #6
0
 public void EnumAttributes(ISerializeInfo info)
 {
     info.SerializeFloatArray(ref tr);
     info.SerializeInt(ref mesh);
     info.SerializeIntArray(ref mats);
 }
예제 #7
0
 public void EnumAttributes(ISerializeInfo info)
 {
     info.SerializeIntArray(ref destroy_meshes);
     info.SerializeFloatArray(ref head_ctrls);
     info.SerializeIntArray(ref go);
 }
예제 #8
0
 public void EnumAttributes(ISerializeInfo info)
 {
     info.SerializeInt(ref topology);
     info.SerializeIntArray(ref indices);
 }