protected virtual void WriteHash(Type type, NetDataWriter writer)
 {
     writer.Put(GetHash(type));
 }
 public void Write <T>(NetDataWriter writer, T packet) where T : class, new()
 {
     WriteHash(typeof(T), writer);
     _netSerializer.Serialize(writer, packet);
 }
 public void WriteNetSerializable <T>(NetDataWriter writer, T packet) where T : INetSerializable
 {
     WriteHash(typeof(T), writer);
     packet.Serialize(writer);
 }
Exemple #4
0
 public void SetSource(NetDataWriter dataWriter)
 {
     _data     = dataWriter.Data;
     _position = 0;
     _dataSize = dataWriter.Length;
 }