Пример #1
0
 public void Load(AssetReader reader)
 {
     PathId  = reader.ReadId();
     Offset  = reader.ReadOffset();
     Offset += Asset.DataOffset;
     Size    = reader.ReadUInt32();
     if (Asset.Format < 17)
     {
         TypeId  = reader.ReadInt32();
         ClassId = reader.ReadInt16();
     }
     else
     {
         var type_id  = reader.ReadInt32();
         var class_id = Asset.Tree.ClassIds[type_id];
         TypeId  = class_id;
         ClassId = class_id;
     }
     if (Asset.Format <= 10)
     {
         IsDestroyed = reader.ReadInt16() != 0;
     }
     if (Asset.Format >= 11 && Asset.Format < 17)
     {
         reader.ReadInt16();
     }
     if (Asset.Format >= 15 && Asset.Format < 17)
     {
         reader.ReadByte();
     }
 }