本文整理汇总了C#中StreamHandler.WriteUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# StreamHandler.WriteUInt64方法的具体用法?C# StreamHandler.WriteUInt64怎么用?C# StreamHandler.WriteUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamHandler
的用法示例。
在下文中一共展示了StreamHandler.WriteUInt64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
//.........这里部分代码省略.........
if (this.HaveTransportTime3)
Writer.WriteUInt32(this.TransportTime3);
Writer
.WriteSingle(this.TransportPosition.Y)
.WriteSByte(this.TransportSeat)
.WriteSingle(this.TransportFacing);
if (this.HaveTransportTime2)
Writer.WriteUInt32(this.TransportTime2);
Writer
.WriteXorByte(bytes[2])
.WriteUInt32(this.TransportTime)
.WriteXorByte(bytes[0]);
}
}
Writer
.WriteSingle(this.Speeds[7])
.WriteSingle(this.Position.X);
if (this.HavePitch)
Writer.WriteSingle(this.Pitch);
// Fall Data
if (this.HaveFallData)
{
Writer.WriteUInt32(this.FallTime);
if (this.HaveFallDirection)
{
Writer
.WriteSingle(this.FallSinAngle)
.WriteSingle(this.FallHorizontalSpeed)
.WriteSingle(this.FallCosAngle);
}
Writer.WriteSingle(this.FallVerticalSpeed);
}
Writer
.WriteXorByte(p_guid.Bytes[7])
.WriteSingle(this.Speeds[4])
.WriteXorByte(p_guid.Bytes[0])
.WriteXorByte(p_guid.Bytes[5]);
if (this.TimeStamp != 0)
Writer.WriteUInt32(this.TimeStamp);
Writer
.WriteSingle(this.Position.Z)
.WriteSingle(this.Speeds[6])
.WriteXorByte(p_guid.Bytes[1])
.WriteSingle(this.Speeds[2])
.WriteSingle(this.Speeds[5])
.WriteSingle(this.Speeds[3])
.WriteSingle(this.Speeds[0])
.WriteXorByte(p_guid.Bytes[3])
.WriteXorByte(p_guid.Bytes[4])
.WriteXorByte(p_guid.Bytes[2])
.WriteXorByte(p_guid.Bytes[6]);
if (this.HaveSplineElevation)
Writer.WriteSingle(this.SplineElevation);
Writer.WriteSingle(this.Position.Y);
if (this.Orientation != 0.0f)
Writer.WriteSingle(this.Orientation);
Writer.WriteSingle(this.Speeds[1]);
}
// floats here
// transport time
if (this.HaveTransportTime)
Writer.WriteUInt32(this.TransportTime);
// shorts here
// go rotation?
if (this.HaveGameObjectRotation)
Writer.WriteUInt64(this.GameObjectRotation.Pack());
// target guid?
if (this.HaveAttackingTarget)
{
fixed (byte* bytes = this.AttackingTarget.Bytes)
{
Writer
.WriteXorByte(bytes[3])
.WriteXorByte(bytes[5])
.WriteXorByte(bytes[0])
.WriteXorByte(bytes[7])
.WriteXorByte(bytes[2])
.WriteXorByte(bytes[4])
.WriteXorByte(bytes[6])
.WriteXorByte(bytes[1]);
}
}
}