Пример #1
0
 public override void Deserialize(byte[] data, Pointer p, bool includeComponents)
 {
     Properties = BitPacker.GetPropertyBag(data, p);
     Stats      = BitPacker.GetStatBag(data, p);
     ID         = BitPacker.GetInt(data, p);
     base.Deserialize(data, p, includeComponents);
 }
Пример #2
0
        public override void Deserialize(byte[] data, Pointer p, bool includeSubComponents)
        {
            // General match info
            Owner  = BitPacker.GetInt(data, p);
            GameID = new Guid(BitPacker.GetString(data, p));

            // Options
            Properties = BitPacker.GetPropertyBag(data, p);

            // Players
            int numPlayers = BitPacker.GetInt(data, p);

            for (int i = 0; i < numPlayers; i++)
            {
                CharacterInfo ci = new CharacterInfo();
                ci.Properties = BitPacker.GetPropertyBag(data, p);
                ci.Stats      = BitPacker.GetStatBag(data, p);
                ci.ID         = BitPacker.GetInt(data, p);
                Players.Add(ci.ID, ci);
            }

            base.Deserialize(data, p, includeSubComponents);
        }