public static void WriteColor(TWXmlNode node, Color c) { node = node.CreateChildNode("Color"); node.AddAttributeInt("A", c.A); node.AddAttributeInt("R", c.R); node.AddAttributeInt("G", c.G); node.AddAttributeInt("B", c.B); }
public static void WriteVector3Array(TWXmlNode node, Vector3[] data) { if (data == null) { node.Value = "NULL"; return; } node.AddAttributeInt("Count", data.Length); for (int i = 0; i < data.Length; i++) { TWXmlNode nodeVector = node.CreateChildNode("Vector3"); nodeVector.AddAttribute("X", data[i].X.ToString()); nodeVector.AddAttribute("Y", data[i].Y.ToString()); nodeVector.AddAttribute("Z", data[i].Z.ToString()); } }