private void ToTransform(string tagName, JsonData root, DTransform dTransform) { var transJson = new JsonData(); root[tagName] = transJson; transJson["Position"] = DTransform.VectorToString(dTransform.position); transJson["Angle"] = DTransform.VectorToString(dTransform.angle); transJson["Scale"] = DTransform.VectorToString(dTransform.scale); }
public DTransform transform; //变换信息 public virtual JsonData Serialize() { var partJson = new JsonData(); partJson["Type"] = partType.ToString(); partJson["Name"] = name; partJson["Source"] = source; partJson["Parent"] = parent; partJson["Position"] = DTransform.VectorToString(transform.position); partJson["Angle"] = DTransform.VectorToString(transform.angle); partJson["Scale"] = DTransform.VectorToString(transform.scale); return(partJson); }