コード例 #1
0
 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);
 }
コード例 #2
0
 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());
     }
 }