public AssetTypeInstance(AssetTypeTemplateField[] baseFields, AssetsFileReader reader, long filePos) { reader.bigEndian = false; reader.Position = filePos; this.baseFieldCount = baseFields.Length; this.baseFields = new AssetTypeValueField[baseFieldCount]; for (int i = 0; i < baseFieldCount; i++) { AssetTypeTemplateField templateBaseField = baseFields[i]; AssetTypeValueField atvf = templateBaseField.MakeValue(reader); this.baseFields[i] = atvf; } }
public AssetTypeInstance(uint baseFieldCount, AssetTypeTemplateField[] ppBaseFields, AssetsFileReader reader, bool bigEndian, ulong filePos = 0) { this.baseFieldCount = baseFieldCount; reader.bigEndian = false; reader.BaseStream.Position = (long)filePos; baseFields = new AssetTypeValueField[this.baseFieldCount]; for (int i = 0; i < baseFieldCount; i++) { AssetTypeTemplateField templateBaseField = ppBaseFields[i]; AssetTypeValueField atvf; templateBaseField.MakeValue(reader, reader.Position, out atvf, reader.bigEndian); baseFields[i] = atvf; } }