Ejemplo n.º 1
0
 public void Depacketize(IReadablePacket packet)
 {
     for (var i = 0; i < _squadIds.Count; i++)
     {
         var id   = packet.ReadInt32();
         var data = _squads[id] = new SquadData();
         data.Formation = packet.ReadPacketizableWithTypeInfo <AbstractFormation>();
         data.Cache     = new FormationCache(data.Formation);
         data.Spacing   = packet.ReadSingle();
         var count = packet.ReadInt32();
         for (var j = 0; j < count; j++)
         {
             data.Members.Add(packet.ReadInt32());
         }
     }
 }