summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XUtliPoolLib/AssetBundleDataBinaryReader.cs
blob: 99f43f0a89fbd90a4b4326ba235040ca25d146d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;
			}
		}
	}
}