本文整理汇总了C#中Glare.Assets.AssetLoader.ExpectPosition方法的典型用法代码示例。如果您正苦于以下问题:C# AssetLoader.ExpectPosition方法的具体用法?C# AssetLoader.ExpectPosition怎么用?C# AssetLoader.ExpectPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Glare.Assets.AssetLoader
的用法示例。
在下文中一共展示了AssetLoader.ExpectPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Object
internal Object(Script script, ScriptBlock block, AssetLoader loader)
: base(script, block)
{
var reader = loader.Reader;
loader.Expect((ushort)0x1234);
LocalVariableOffset = reader.ReadUInt16();
int functionSelectorListOffset = reader.ReadUInt16();
int variableSelectorCount = reader.ReadUInt16();
Codex<VariableSelector> variableSelectors = new Codex<VariableSelector>(variableSelectorCount);
Variables = variableSelectors;
for (int index = 0; index < variableSelectorCount; index++)
variableSelectors.Add(new VariableSelector(this, loader));
int functionSelectorCount = reader.ReadUInt16();
Codex<FunctionSelector> functionSelectors = new Codex<FunctionSelector>(functionSelectorCount);
Functions = functionSelectors;
for (int index = 0; index < functionSelectorCount; index++)
functionSelectors.Add(new FunctionSelector(this, loader));
loader.Expect((ushort)0);
for (int index = 0; index < functionSelectorCount; index++)
functionSelectors[index].ReadCodeOffset(loader);
loader.ExpectPosition(block.EndOffset);
}