本文整理汇总了C#中Glare.Assets.AssetLoader.SetProgressToPosition方法的典型用法代码示例。如果您正苦于以下问题:C# AssetLoader.SetProgressToPosition方法的具体用法?C# AssetLoader.SetProgressToPosition怎么用?C# AssetLoader.SetProgressToPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Glare.Assets.AssetLoader
的用法示例。
在下文中一共展示了AssetLoader.SetProgressToPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Module
internal Module(AssetLoader loader)
: base(loader)
{
loader.Progress = 0;
Reader = loader.Reader;
var tes4Record = new RecordHeader(Reader);
tes4Record.RequireType("TES4");
using (RecordReader reader = tes4Record.OpenReader(Reader)) {
while (reader.ReadField()) {
switch (reader.Field.Type) {
case "HEDR":
reader.RequireFieldSize(12);
Version = reader.ReadSingle();
RecordCount = reader.ReadInt32();
NextAvailableObjectId = reader.ReadFormId();
break;
case "CNAM": Author = reader.ReadStringBody(); break;
case "SNAM": Description = reader.ReadStringBody(); break;
case "MAST": MastersMutable.Add(reader.ReadStringBody()); break;
case "DATA": // File size of a MAST - always 0, probably vestigial.
long fileSize = reader.ReadInt64OrInt32Body();
if (fileSize != 0)
throw new InvalidDataException();
break;
case "ONAM":
OverridesMutable.Capacity = reader.Field.Size / 4;
for (int index = 0, count = reader.Field.Size / 4; index < count; index++)
OverridesMutable.Add(reader.ReadFormId());
break;
case "INTV": InternalVersion = reader.ReadInt32Body(); break;
case "INCC": InternalCC = reader.ReadInt32Body(); break;
default:
throw reader.UnknownFieldException();
}
}
}
while (!loader.AtEnd) {
loader.SetProgressToPosition();
AddChild(Group.ReadGroup(this));
}
}