Exemple #1
0
 public void WriteXml(StringBuilder sb, int indent)
 {
     YvrXml.ValueTag(sb, indent, "Time", Time.ToString());
     YvrXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(Position));
     YvrXml.SelfClosingTag(sb, indent, "Velocity " + FloatUtil.GetVector3XmlString(Velocity));
     YvrXml.SelfClosingTag(sb, indent, "Forward " + FloatUtil.GetVector3XmlString(Forward));
     YvrXml.SelfClosingTag(sb, indent, "Right " + FloatUtil.GetVector3XmlString(Right));
     YvrXml.ValueTag(sb, indent, "Steering", FloatUtil.ToString(Steering));
     YvrXml.ValueTag(sb, indent, "GasPedal", FloatUtil.ToString(GasPedal));
     YvrXml.ValueTag(sb, indent, "BrakePedal", FloatUtil.ToString(BrakePedal));
     YvrXml.ValueTag(sb, indent, "Handbrake", Handbrake.ToString());
 }
Exemple #2
0
 public static void WriteXmlNode(VehicleRecordList l, StringBuilder sb, int indent, string name = "VehicleRecordList")
 {
     if (l == null)
     {
         return;
     }
     if ((l.Entries?.data_items == null) || (l.Entries.data_items.Length == 0))
     {
         YvrXml.SelfClosingTag(sb, indent, name);
     }
     else
     {
         YvrXml.OpenTag(sb, indent, name);
         l.WriteXml(sb, indent + 1);
         YvrXml.CloseTag(sb, indent, name);
     }
 }