本文整理汇总了C#中Blamite.Flexibility.StructureValueCollection.GetInteger方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetInteger方法的具体用法?C# StructureValueCollection.GetInteger怎么用?C# StructureValueCollection.GetInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Flexibility.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
private void Load(StructureValueCollection values)
{
Magic = (int) values.GetInteger("magic");
ParentMagic = (int) values.GetInteger("parent magic");
GrandparentMagic = (int) values.GetInteger("grandparent magic");
// No description stringid :(
}
示例2: Load
private void Load(StructureValueCollection values)
{
Magic = (int)values.GetInteger("magic");
ParentMagic = (int)values.GetInteger("parent magic");
GrandparentMagic = (int)values.GetInteger("grandparent magic");
Description = new StringID((int)values.GetIntegerOrDefault("stringid", 0));
}
示例3: ReadObjects
/// <summary>
/// Reads all child objects of this reflexive.
/// </summary>
/// <param name="values">The values read from the parent.</param>
/// <param name="reader">The stream to read from.</param>
/// <param name="metaArea">The meta area of the cache file.</param>
/// <param name="stringIDs">The string ID source for the cache file.</param>
/// <param name="buildInfo">The build info for the cache file.</param>
/// <returns>The objects that were read.</returns>
public ScriptObject[] ReadObjects(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, BuildInformation buildInfo)
{
int count = (int)values.GetInteger(_countEntryName);
uint address = (uint)values.GetInteger(_addressEntryName);
var layout = buildInfo.GetLayout(_layoutName);
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
return entries.Select(e => ReadScriptObject(e, reader, metaArea, stringIDs, buildInfo)).ToArray();
}
示例4: ThirdGenGlobal
public ThirdGenGlobal(StructureValueCollection values, ExpressionTable allExpressions)
{
Name = values.GetString("name");
Type = (short)values.GetInteger("type");
DatumIndex valueIndex = new DatumIndex(values.GetInteger("expression index"));
if (valueIndex.IsValid)
Value = allExpressions.FindExpression(valueIndex);
}
示例5: Load
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
{
VertexFormat = (int)values.GetInteger("vertex format");
ExtraElementsPerVertex = (int)values.GetInteger("extra elements per vertex");
ExtraElementsType = (ExtraVertexElementType)values.GetInteger("extra element type");
LoadSubmeshes(values, reader, metaArea, buildInfo);
LoadVertexGroups(values, reader, metaArea, buildInfo, Submeshes);
}
示例6: Load
private void Load(StructureValueCollection values, IModelSubmesh[] submeshes)
{
IndexBufferStart = (int)values.GetInteger("index buffer start");
IndexBufferCount = (int)values.GetInteger("index buffer count");
VertexBufferCount = (int)values.GetInteger("vertex buffer count");
int submeshIndex = (int)values.GetInteger("parent submesh index");
Submesh = submeshes[submeshIndex];
}
示例7: LoadSubmeshes
private void LoadSubmeshes(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
{
int count = (int)values.GetInteger("number of submeshes");
uint address = values.GetInteger("submesh table address");
var layout = buildInfo.GetLayout("model submesh");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
Submeshes = (from entry in entries
select new ThirdGenModelSubmesh(entry)).ToArray();
}
示例8: LoadPermutations
private void LoadPermutations(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
{
int count = (int)values.GetInteger("number of permutations");
uint address = values.GetInteger("permutation table address");
var layout = buildInfo.GetLayout("model permutation");
var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);
Permutations = (from entry in entries
select new ThirdGenModelPermutation(entry)).ToArray();
}
示例9: Load
private void Load(StructureValueCollection values, ThirdGenCacheFileReference[] externalFiles)
{
int fileIndex = (int)values.GetInteger("shared cache file index");
if (fileIndex >= 0 && fileIndex < externalFiles.Length)
_externalFile = externalFiles[fileIndex];
Offset = (int)values.GetInteger("compressed block offset");
CompressedSize = (int)values.GetInteger("compressed block size");
UncompressedSize = (int)values.GetInteger("uncompressed block size");
}
示例10: LoadSegments
private void LoadSegments(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, ThirdGenResourcePage[] pages)
{
int count = (int)values.GetInteger("number of raw segments");
uint address = values.GetInteger("raw segment table address");
var layout = buildInfo.GetLayout("raw segment table entry");
var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);
Segments = (from entry in entries
select new ThirdGenResourceSegment(entry, pages)).ToArray();
}
示例11: LoadFileReferences
private void LoadFileReferences(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
{
int count = (int)values.GetInteger("number of external cache files");
uint address = values.GetInteger("external cache file table address");
var layout = buildInfo.GetLayout("external cache file table entry");
var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);
FileReferences = (from entry in entries
select new ThirdGenCacheFileReference(entry)).ToArray();
}
示例12: LoadVertexGroups
private void LoadVertexGroups(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, IModelSubmesh[] submeshes)
{
int count = (int)values.GetInteger("number of vertex groups");
uint address = values.GetInteger("vertex group table address");
var layout = buildInfo.GetLayout("model vertex group");
var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
VertexGroups = (from entry in entries
select new ThirdGenModelVertexGroup(entry, submeshes)).ToArray();
}
示例13: LoadResources
private void LoadResources(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, ThirdGenTagTable tags, ThirdGenResourceLayoutTable layoutInfo)
{
int count = (int)values.GetInteger("number of resources");
uint address = values.GetInteger("resource table address");
var layout = buildInfo.GetLayout("resource table entry");
var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);
_resources = new ThirdGenResource[entries.Length];
for (ushort i = 0; i < entries.Length; i++)
_resources[i] = new ThirdGenResource(entries[i], i, tags, layoutInfo);
}
示例14: Load
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, BuildInformation buildInfo)
{
Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name");
ExecutionType = (short)values.GetInteger("execution type");
ReturnType = (short)values.GetInteger("return type");
RootExpressionIndex = new DatumIndex(values.GetInteger("first expression index"));
if (Name == null)
Name = "script_" + RootExpressionIndex.Value.ToString("X8");
Parameters = LoadParameters(reader, values, metaArea, buildInfo);
}
示例15: LoadSections
private void LoadSections(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
EngineDescription buildInfo)
{
var count = (int) values.GetInteger("number of sections");
uint address = values.GetInteger("section table address");
StructureLayout layout = buildInfo.Layouts.GetLayout("model section");
StructureValueCollection[] entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
Sections = (from entry in entries
select new ThirdGenModelSection(entry, reader, metaArea, buildInfo)).ToArray();
}