本文整理匯總了C#中BinaryReaderEx.ReadSByte方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryReaderEx.ReadSByte方法的具體用法?C# BinaryReaderEx.ReadSByte怎麽用?C# BinaryReaderEx.ReadSByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BinaryReaderEx
的用法示例。
在下文中一共展示了BinaryReaderEx.ReadSByte方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SByteToInt
private static int SByteToInt(BinaryReaderEx src)
{
return (int)src.ReadSByte();
}
示例2: LoadSection
public override void LoadSection(BinaryReaderEx reader)
{
base.LoadSection(reader);
this.MotionInfoBlocks = new List<MotionInfoBlock>();
int numMIBs = (this.SectionLength - 4) / bytesPerBlock;
for (var i = 0; i < numMIBs; i++)
{
var mib = new MotionInfoBlock();
mib.MotionName = reader.ReadFixedLengthString(16).Trim();
mib.FrameCount = reader.ReadSByte();
mib.CurveCoefficient = reader.ReadSByte();
mib.InitialVelocity = reader.ReadSByte();
mib.RollingFrameEnd = reader.ReadSByte();
mib.CaseOfRightFootEnd = reader.ReadSByte();
mib.CaseOfLeftFootEnd = reader.ReadSByte();
mib.Unk1 = reader.ReadSByte();
mib.Unk2 = reader.ReadSByte();
mib.SubstituteMotionName = reader.ReadFixedLengthString(16).Trim();
mib.SubstituteMotionStartFrame = reader.ReadSByte();
mib.IdleFramesToBlend = reader.ReadSByte();
mib.FrameStartingRotationStop = reader.ReadSByte();
mib.EndsOnWhichFoot = reader.ReadSByte();
mib.Unknown = reader.ReadInt16();
this.MotionInfoBlocks.Add(mib);
}
}
示例3: SByteToFloat
private static float SByteToFloat(BinaryReaderEx src)
{
sbyte val = src.ReadSByte();
return val / 127f;
}