本文整理匯總了C#中System.IO.BinaryWriter.WriteMany方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryWriter.WriteMany方法的具體用法?C# BinaryWriter.WriteMany怎麽用?C# BinaryWriter.WriteMany使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteMany方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: WritePayload
protected override void WritePayload(BinaryWriter writer)
{
writer.Write(UniqueId);
writer.Write(Position);
writer.Write(Velocity);
writer.WriteMany(Knockback, Damage, OwnerPlayerId, Type, AiFlags.ConvertToByte());
if(Ai != null)
foreach (float ai in Ai)
writer.Write(ai);
}
示例2: Pack
public void Pack(Stream stream)
{
this.Metadata.Pack(stream);
this.Settings.Pack(stream);
for (int i = 0; i < this.Profiles.Length; i++) this.Profiles[i].Pack(stream);
for (int i = 0; i < this.Months.Length; i++) this.Months[i].Pack(stream);
using (BinaryWriter writer = new BinaryWriter(stream, Encoding.UTF8, true))
{
writer.WriteMany(RESERVED_VALUE, EEPROM_RESERVED);
}
}
示例3: WritePayload
protected override void WritePayload(BinaryWriter writer)
{
writer.WriteMany(PlayerId, Control, Pulley, SelectedItem);
writer.Write(Position);
writer.Write(Velocity);
}
示例4: WritePayload
protected override void WritePayload(BinaryWriter writer)
{
writer.WriteMany(PlayerId, QuestsCompleted);
}
示例5: WritePayload
protected override void WritePayload(BinaryWriter writer)
{
writer.WriteMany(ItemId, Owner);
}