diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs')
-rw-r--r-- | Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs b/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs new file mode 100644 index 00000000..99f43f0a --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs @@ -0,0 +1,43 @@ +using System;
+
+namespace XUtliPoolLib
+{
+ internal class AssetBundleDataBinaryReader : AssetBundleDataReader
+ {
+ public override void Read(XBinaryReader reader)
+ {
+ for (;;)
+ {
+ bool isEof = reader.IsEof;
+ if (isEof)
+ {
+ break;
+ }
+ uint num = reader.ReadUInt32();
+ uint key = reader.ReadUInt32();
+ byte compositeType = reader.ReadByte();
+ byte b = reader.ReadByte();
+ uint[] array = null;
+ bool flag = b > 0;
+ if (flag)
+ {
+ array = new uint[(int)b];
+ }
+ bool flag2 = !this.shortName2FullName.ContainsKey(key);
+ if (flag2)
+ {
+ this.shortName2FullName.Add(key, num);
+ }
+ for (int i = 0; i < (int)b; i++)
+ {
+ array[i] = reader.ReadUInt32();
+ }
+ AssetBundleData assetBundleData = new AssetBundleData();
+ assetBundleData.fullName = num;
+ assetBundleData.dependencies = array;
+ assetBundleData.compositeType = (AssetBundleExportType)compositeType;
+ this.infoMap[num] = assetBundleData;
+ }
+ }
+ }
+}
|