Example #1
0
 /// <summary>
 /// Deserialize the content from the network stream into an Message object
 /// </summary>
 /// <param name="reader"></param>
 public void Deserialize(SerializeReader reader)
 {
     Type = (MessageType)reader.ReadByte();
     Text = reader.ReadUnicodePrefixed();
     Tick = new DateTime(reader.ReadInt64());
 }
Example #2
0
 /// <summary>
 /// Read the value in the order of which we serialize it before sending over the networks stream
 /// </summary>
 /// <param name="reader"the SerializeReader object which we going to read the value></param>
 public void Deserialize(SerializeReader reader)
 {
     X     = reader.ReadByte();
     Y     = reader.ReadByte();
     Color = reader.ReadByte();
 }