本文整理汇总了C#中System.IO.BinaryWriter.WriteVariableLengthString方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WriteVariableLengthString方法的具体用法?C# BinaryWriter.WriteVariableLengthString怎么用?C# BinaryWriter.WriteVariableLengthString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteVariableLengthString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteMapWorld
private static void WriteMapWorld(BinaryWriter bw, World w)
{
bw.WriteVariableLengthString("CMapWorld");
WriteMapBase(bw, w);
WriteEntityData(bw, w.EntityData);
bw.Write(w.Paths.Count);
foreach (var path in w.Paths)
{
WritePath(bw, path);
}
}
示例2: WriteMapSolid
private static void WriteMapSolid(BinaryWriter bw, Solid s)
{
bw.WriteVariableLengthString("CMapSolid");
WriteMapBase(bw, s);
bw.Write(s.Faces.Count);
foreach (var face in s.Faces)
{
WriteFace(bw, face);
}
}
示例3: WriteMapGroup
private static void WriteMapGroup(BinaryWriter bw, Group g)
{
bw.WriteVariableLengthString("CMapGroup");
WriteMapBase(bw, g);
}
示例4: WriteMapEntity
private static void WriteMapEntity(BinaryWriter bw, Entity ent)
{
bw.WriteVariableLengthString("CMapEntity");
WriteMapBase(bw, ent);
WriteEntityData(bw, ent.EntityData);
bw.Write(new byte[2]); // Unused
bw.WriteCoordinate(ent.Origin);
bw.Write(new byte[4]); // Unused
}
示例5: WriteEntityData
private static void WriteEntityData(BinaryWriter bw, EntityData data)
{
bw.WriteVariableLengthString(data.Name);
bw.Write(new byte[4]); // Unused
bw.Write(data.Flags);
bw.Write(data.Properties.Count);
foreach (var property in data.Properties)
{
WriteProperty(bw, property);
}
bw.Write(new byte[12]); // Unused
}
示例6: WriteProperty
public static void WriteProperty(BinaryWriter bw, Property p)
{
bw.WriteVariableLengthString(p.Key);
bw.WriteVariableLengthString(p.Value);
}