示例#1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(VerticesName, Vertices.ExportYAML(container));
            node.Add(IndicesName, Indices.ExportYAML(true));
            node.Add(BoundsName, Bounds.ExportYAML(container));
            node.Add(NodesName, Nodes.ExportYAML(container));
            return(node);
        }
示例#2
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("m_Vertices", Vertices.ExportYAML(container));
            node.Add("m_Indices", Indices.ExportYAML(true));
            node.Add("m_Bounds", Bounds.ExportYAML(container));
            node.Add("m_Nodes", Nodes.ExportYAML(container));
            return(node);
        }
示例#3
0
        public YAMLNode ExportYAML(IAssetsExporter exporter)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("m_Vertices", Vertices.ExportYAML(exporter));
            node.Add("m_Indices", Indices.ExportYAML(true));
            node.Add("m_Bounds", Bounds.ExportYAML(exporter));
            node.Add("m_Nodes", Nodes.ExportYAML(exporter));
            return(node);
        }
示例#4
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(NameName, Name);
            node.Add(RectName, Rect.ExportYAML(container));
            node.Add(AlignmentName, (int)Alignment);
            node.Add(PivotName, Pivot.ExportYAML(container));
            if (HasBorder(container.ExportVersion))
            {
                node.Add(BorderName, Border.ExportYAML(container));
            }
            if (HasOutline(container.ExportVersion))
            {
                node.Add(OutlineName, Outline.ExportYAML(container));
            }
            if (HasPhysicsShape(container.ExportVersion))
            {
                node.Add(PhysicsShapeName, PhysicsShape.ExportYAML(container));
            }
            if (HasTessellationDetail(container.ExportVersion))
            {
                node.Add(TessellationDetailName, TessellationDetail);
            }
            if (HasBones(container.ExportVersion))
            {
                node.Add(BonesName, Bones.ExportYAML(container));
                node.Add(SpriteIDName, SpriteID);
            }
            if (HasInternalID(container.ExportVersion))
            {
                node.Add(InternalIDName, InternalID);
            }
            if (HasBones(container.ExportVersion))
            {
                node.Add(VerticesName, Vertices.ExportYAML(container));
                node.Add(IndicesName, Indices.ExportYAML(true));
                node.Add(EdgesName, Edges.ExportYAML(container));
                node.Add(WeightsName, Weights.ExportYAML(container));
            }
            return(node);
        }
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(SpritesName, Sprites.ExportYAML(container));
            if (SpriteMetaData.HasOutline(container.ExportVersion))
            {
                node.Add(OutlineName, Outline.ExportYAML(container));
            }
            if (SpriteMetaData.HasPhysicsShape(container.ExportVersion))
            {
                node.Add(PhysicsShapeName, PhysicsShape.ExportYAML(container));
            }
            if (SpriteMetaData.HasBones(container.ExportVersion))
            {
                node.Add(BonesName, Bones.ExportYAML(container));
                node.Add(SpriteIDName, SpriteID);
            }
            if (SpriteMetaData.HasInternalID(container.ExportVersion))
            {
                node.Add(InternalIDName, InternalID);
            }
            if (SpriteMetaData.HasBones(container.ExportVersion))
            {
                node.Add(VerticesName, Vertices.ExportYAML(container));
                node.Add(IndicesName, Indices.ExportYAML(true));
                node.Add(EdgesName, Edges.ExportYAML(container));
                node.Add(WeightsName, Weights.ExportYAML(container));
            }
            if (HasSecondaryTextures(container.ExportVersion))
            {
                node.Add(SecondaryTexturesName, SecondaryTextures.ExportYAML(container));
            }
            return(node);
        }