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