Example #1
0
 protected override void Deserialize(NetworkBinaryReader reader)
 {
     GameplayMode = reader.ReadCanonicalString();
     ArenaID = reader.ReadByte();
     ArenaToPlay = reader.ReadString();
     ArenaTimeLeft = reader.ReadTimeSpan();
     WallCount = reader.ReadInt32();
 }
 protected override void Deserialize(NetworkBinaryReader reader)
 {
     int canonicalStringCount = reader.ReadInt32();
     CanonicalStrings = new List<string>(canonicalStringCount);
     CanonicalStrings.Add(null);
     for (int i = 1; i < canonicalStringCount; ++i)
         CanonicalStrings.Add(reader.ReadString());
     int keyLength = reader.ReadInt16();
     GameClientKey = reader.ReadBytes(keyLength);
 }
 public void TestByteOrderInt32()
 {
     byte[][] datas = { new byte[] { 1, 2, 3, 4 }, new byte[] { 255, 253, 251, 247 } };
     foreach (byte[] data in datas)
     {
         NetworkBinaryReader reader = new NetworkBinaryReader(new MemoryStream(data));
         int value = reader.ReadInt32();
         if (BitConverter.IsLittleEndian)
             Array.Reverse(data);
         Assert.AreEqual(BitConverter.ToInt32(data, 0), value);
     }
 }
Example #4
0
 protected override void Deserialize(NetworkBinaryReader reader)
 {
     FrameNumber = reader.ReadInt32();
 }
Example #5
0
 protected override void Deserialize(NetworkBinaryReader reader)
 {
     Timestamp = reader.ReadTimeSpan();
     TotalGameTimeOnReply = reader.ReadTimeSpan();
     FrameNumberOnReply = reader.ReadInt32();
 }
Example #6
0
 public void Deserialize(NetworkBinaryReader reader, SerializationModeFlags mode, int framesAgo)
 {
     if ((mode & SerializationModeFlags.ConstantDataFromServer) != 0)
     {
         _type = (CollisionAreaType)reader.ReadInt32();
         _name = reader.ReadString();
         _collisionMaterial = (CollisionMaterialType)reader.ReadByte();
         _area.Deserialize(reader, SerializationModeFlags.AllFromServer, framesAgo);
     }
 }