本文整理汇总了C#中CrystalMpq.MpqFileStream.ReadValueF32方法的典型用法代码示例。如果您正苦于以下问题:C# MpqFileStream.ReadValueF32方法的具体用法?C# MpqFileStream.ReadValueF32怎么用?C# MpqFileStream.ReadValueF32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CrystalMpq.MpqFileStream
的用法示例。
在下文中一共展示了MpqFileStream.ReadValueF32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(MpqFileStream stream)
{
this.I0 = stream.ReadValueS32();
this.SNOSubTreasureClass = stream.ReadValueS32();
this.Percentage = stream.ReadValueF32();
this.I1 = stream.ReadValueS32();
this.GBIdQualityClass = stream.ReadValueS32();
this.I2 = stream.ReadValueS32();
this.I3 = stream.ReadValueS32();
this.SNOCondition = stream.ReadValueS32();
this.ItemSpecifier = new ItemSpecifierData(stream);
this.I5 = stream.ReadValueS32();
this.I4 = new int[4];
for (int i = 0; i < 4; i++)
this.I4[i] = stream.ReadValueS32();
}
示例2: TagMapEntry
public TagMapEntry(MpqFileStream stream)
{
this.Type = stream.ReadValueS32();
this.TagID = stream.ReadValueS32();
switch (this.Type)
{
case 0:
this.Int2 = stream.ReadValueS32();
break;
case 1:
Float0 = stream.ReadValueF32();
break;
case 2: // SNO
this.Int2 = stream.ReadValueS32();
break;
case 4:
this.ScriptFormula = new ScriptFormula(stream);
break;
default:
this.Int2 = stream.ReadValueS32();
break;
}
}
示例3: MonsterDef
public MonsterDef(MpqFileStream stream)
{
F0 = stream.ReadValueF32();
F1 = stream.ReadValueF32();
F2 = stream.ReadValueF32();
F3 = stream.ReadValueF32();
I0 = stream.ReadValueS32();
}
示例4: NavMeshDef
public NavMeshDef(MpqFileStream stream)
{
this.SquaresCountX = stream.ReadValueS32();
this.SquaresCountY = stream.ReadValueS32();
this.Int0 = stream.ReadValueS32();
this.NavMeshSquareCount = stream.ReadValueS32();
this.Float0 = stream.ReadValueF32();
this.Squares = stream.ReadSerializedData<NavMeshSquare>(this.NavMeshSquareCount);
stream.Position += (3 * 4);
this.Filename = stream.ReadString(256, true);
}
示例5: FileRead
public void FileRead(MpqFileStream stream, long offset)
{
stream.Position = offset + 0;
Field0 = new RequiredMessageHeader();
Field0.FileRead(stream, stream.Position);
stream.Position = offset + 8;
Tick = stream.ReadValueS32();
stream.Position = offset + 12;
_Field2 = stream.ReadValueS32();
stream.Position = offset + 16;
Position = new Vector3D();
Position.FileRead(stream, stream.Position);
stream.Position = offset + 28;
Angle = stream.ReadValueF32();
stream.Position = offset + 32;
Speed = stream.ReadValueF32();
stream.Position = offset + 36;
Field6 = stream.ReadValueS32();
stream.Position = offset + 40;
_AnimationTag = stream.ReadValueS32();
stream.Position = offset + 44;
// : type DT_OPTIONAL[int] hasnt a deserializer implemented
throw new Exception("some fields arent going to be decoded.");
}
示例6: NavMeshDef
public NavMeshDef(MpqFileStream stream)
{
this.SquaresCountX = stream.ReadValueS32();
this.SquaresCountY = stream.ReadValueS32();
this.Int0 = stream.ReadValueS32();
this.NavMeshSquareCount = stream.ReadValueS32();
this.Float0 = stream.ReadValueF32();
this.Squares = stream.ReadSerializedData<NavMeshSquare>();
if (SquaresCountX < 64 && SquaresCountY < 64)
{
WalkGrid = new byte[64, 64];
}
else if (SquaresCountX < 128 && SquaresCountY < 128)
{
WalkGrid = new byte[128, 128]; //96*96
}
else if (SquaresCountX > 128 || SquaresCountY > 128)
{
WalkGrid = new byte[256, 256];
}
// Loop thru each NavmeshSquare in the array, and fills the grid
for (int i = 0; i < NavMeshSquareCount; i++)
{
WalkGrid[i % SquaresCountX, i / SquaresCountY] = (byte)(Squares[i].Flags & Scene.NavCellFlags.AllowWalk);
// Set the grid to 0x1 if its walkable, left as 0 if not. - DarkLotus
}
stream.Position += (3 * 4);
this.Filename = stream.ReadString(256, true);
}
示例7: Read
public void Read(MpqFileStream stream)
{
this.Float0 = stream.ReadValueF32();
this.Flags = stream.ReadValueS32();
}
示例8: Read
public void Read(MpqFileStream stream)
{
X = stream.ReadValueF32();
Y = stream.ReadValueF32();
Z = stream.ReadValueF32();
}
示例9: NavZoneDef
public NavZoneDef(MpqFileStream stream)
{
this.NavCellCount = stream.ReadValueS32();
stream.Position += (3 * 4);
this.NavCells = stream.ReadSerializedData<NavCell>();
this.NeighbourCount = stream.ReadValueS32();
stream.Position += (3 * 4);
this.NavCellNeighbours = stream.ReadSerializedData<NavCellLookup>();
this.Float0 = stream.ReadValueF32();
this.Float1 = stream.ReadValueF32();
this.Int2 = stream.ReadValueS32();
this.V0 = new Vector2D(stream);
stream.Position += (3 * 4);
this.GridSquares = stream.ReadSerializedData<NavGridSquare>();
this.Int3 = stream.ReadValueS32();
stream.Position += (3 * 4);
this.CellLookups = stream.ReadSerializedData<NavCellLookup>();
this.BorderDataCount = stream.ReadValueS32();
stream.Position += (3 * 4);
this.BorderData = stream.ReadSerializedData<NavCellBorderData>();
}
示例10: MonsterSkillDeclaration
public MonsterSkillDeclaration(MpqFileStream stream)
{
F0 = stream.ReadValueF32();
F1 = stream.ReadValueF32();
I0 = stream.ReadValueS32();
F2 = stream.ReadValueF32();
}
示例11: HealthDropInfo
public HealthDropInfo(MpqFileStream stream)
{
this.F0 = stream.ReadValueF32();
this.GBID = stream.ReadValueS32();
this.I1 = stream.ReadValueS32();
}
示例12: Vector3D
/// <summary>
/// Reads Vector3D from given MPQFileStream.
/// </summary>
/// <param name="stream">The MPQFileStream to read from.</param>
public Vector3D(MpqFileStream stream)
: this(stream.ReadValueF32(), stream.ReadValueF32(), stream.ReadValueF32())
{
}
示例13: DifficultyTuningParams
public DifficultyTuningParams(MpqFileStream stream)
{
this.F0 = stream.ReadValueF32();
this.F1 = stream.ReadValueF32();
this.F2 = stream.ReadValueF32();
this.F3 = stream.ReadValueF32();
this.F4 = stream.ReadValueF32();
this.F5 = stream.ReadValueF32();
this.F6 = stream.ReadValueF32();
}
示例14: Read
public void Read(MpqFileStream stream)
{
this.Z = stream.ReadValueF32();
this.Flags = (NavCellFlags)stream.ReadValueS32();
}
示例15: Read
public void Read(MpqFileStream stream)
{
this.UHash = stream.ReadValueS32();
this.S0 = stream.ReadString(64, true);
this.F0 = stream.ReadValueF32();
}