Пример #1
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add("mode0", (int)Mode0);
            node.Add("vectorComponentCount0", VectorComponentCount0);
            node.Add("color0", Color0.ExportYAML(container));
            //node.Add("colorLabel0", IsReadLabel(container.Flags) ? ColorLabel0 : "Color");
            node.Add("vector0_0", Vector0_0.ExportYAML(container));
            //node.Add("vectorLabel0_0", IsReadLabel(container.Flags) ? VectorLabel0_0 : "X");
            node.Add("vector0_1", Vector0_1.ExportYAML(container));
            //node.Add("vectorLabel0_1", IsReadLabel(container.Flags) ? VectorLabel0_1 : "Y");
            node.Add("vector0_2", Vector0_2.ExportYAML(container));
            //node.Add("vectorLabel0_2", IsReadLabel(container.Flags) ? VectorLabel0_2 : "Z");
            node.Add("vector0_3", Vector0_3.ExportYAML(container));
            //node.Add("vectorLabel0_3", IsReadLabel(container.Flags) ? VectorLabel0_3 : "W");
            node.Add("mode1", (int)Mode1);
            node.Add("vectorComponentCount1", VectorComponentCount1);
            node.Add("color1", Color1.ExportYAML(container));
            //node.Add("colorLabel1", IsReadLabel(container.Flags) ? ColorLabel1 : "Color");
            node.Add("vector1_0", Vector1_0.ExportYAML(container));
            //node.Add("vectorLabel1_0", IsReadLabel(container.Flags) ? VectorLabel1_0 : "X");
            node.Add("vector1_1", Vector1_1.ExportYAML(container));
            //node.Add("vectorLabel1_1", IsReadLabel(container.Flags) ? VectorLabel1_1 : "Y");
            node.Add("vector1_2", Vector1_2.ExportYAML(container));
            //node.Add("vectorLabel1_2", IsReadLabel(container.Flags) ? VectorLabel1_2 : "Z");
            node.Add("vector1_3", Vector1_3.ExportYAML(container));
            //node.Add("vectorLabel1_3", IsReadLabel(container.Flags) ? VectorLabel1_3 : "W");
            return(node);
        }
        public override YAMLNode ExportYAML(IAssetsExporter exporter)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(exporter);

            node.Add("mode0", Mode0);
            node.Add("vectorComponentCount0", VectorComponentCount0);
            node.Add("color0", Color0.ExportYAML(exporter));
            node.Add("colorLabel0", IsReadLabel(exporter.Platform) ? ColorLabel0 : "Color");
            node.Add("vector0_0", Vector0_0.ExportYAML(exporter));
            node.Add("vectorLabel0_0", IsReadLabel(exporter.Platform) ? VectorLabel0_0 : "X");
            node.Add("vector0_1", Vector0_1.ExportYAML(exporter));
            node.Add("vectorLabel0_1", IsReadLabel(exporter.Platform) ? VectorLabel0_1 : "Y");
            node.Add("vector0_2", Vector0_2.ExportYAML(exporter));
            node.Add("vectorLabel0_2", IsReadLabel(exporter.Platform) ? VectorLabel0_2 : "Z");
            node.Add("vector0_3", Vector0_3.ExportYAML(exporter));
            node.Add("vectorLabel0_3", IsReadLabel(exporter.Platform) ? VectorLabel0_3 : "W");
            node.Add("mode1", Mode1);
            node.Add("vectorComponentCount1", VectorComponentCount1);
            node.Add("color1", Color1.ExportYAML(exporter));
            node.Add("colorLabel1", IsReadLabel(exporter.Platform) ? ColorLabel1 : "Color");
            node.Add("vector1_0", Vector1_0.ExportYAML(exporter));
            node.Add("vectorLabel1_0", IsReadLabel(exporter.Platform) ? VectorLabel1_0 : "X");
            node.Add("vector1_1", Vector1_1.ExportYAML(exporter));
            node.Add("vectorLabel1_1", IsReadLabel(exporter.Platform) ? VectorLabel1_1 : "Y");
            node.Add("vector1_2", Vector1_2.ExportYAML(exporter));
            node.Add("vectorLabel1_2", IsReadLabel(exporter.Platform) ? VectorLabel1_2 : "Z");
            node.Add("vector1_3", Vector1_3.ExportYAML(exporter));
            node.Add("vectorLabel1_3", IsReadLabel(exporter.Platform) ? VectorLabel1_3 : "W");
            return(node);
        }
Пример #3
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add(Mode0Name, (int)Mode0);
            node.Add(VectorComponentCount0Name, VectorComponentCount0);
            node.Add(Color0Name, Color0.ExportYAML(container));
            //node.Add("colorLabel0", HasLabel(container.Flags) ? ColorLabel0 : "Color");
            node.Add(Vector00Name, Vector0_0.ExportYAML(container));
            //node.Add("vectorLabel0_0", HasLabel(container.Flags) ? VectorLabel0_0 : "X");
            node.Add(Vector01Name, Vector0_1.ExportYAML(container));
            //node.Add("vectorLabel0_1", HasLabel(container.Flags) ? VectorLabel0_1 : "Y");
            node.Add(Vector02Name, Vector0_2.ExportYAML(container));
            //node.Add("vectorLabel0_2", HasLabel(container.Flags) ? VectorLabel0_2 : "Z");
            node.Add(Vector03Name, Vector0_3.ExportYAML(container));
            //node.Add("vectorLabel0_3", HasLabel(container.Flags) ? VectorLabel0_3 : "W");
            node.Add(Mode1Name, (int)Mode1);
            node.Add(VectorComponentCount1Name, VectorComponentCount1);
            node.Add(Color1Name, Color1.ExportYAML(container));
            //node.Add("colorLabel1", HasLabel(container.Flags) ? ColorLabel1 : "Color");
            node.Add(Vector10Name, Vector1_0.ExportYAML(container));
            //node.Add("vectorLabel1_0", HasLabel(container.Flags) ? VectorLabel1_0 : "X");
            node.Add(Vector11Name, Vector1_1.ExportYAML(container));
            //node.Add("vectorLabel1_1", HasLabel(container.Flags) ? VectorLabel1_1 : "Y");
            node.Add(Vector12Name, Vector1_2.ExportYAML(container));
            //node.Add("vectorLabel1_2", HasLabel(container.Flags) ? VectorLabel1_2 : "Z");
            node.Add(Vector13Name, Vector1_3.ExportYAML(container));
            //node.Add("vectorLabel1_3", HasLabel(container.Flags) ? VectorLabel1_3 : "W");
            return(node);
        }
Пример #4
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            Mode0 = stream.ReadInt32();
            VectorComponentCount0 = stream.ReadInt32();
            Color0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                ColorLabel0 = stream.ReadStringAligned();
            }
            Vector0_0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_0 = stream.ReadStringAligned();
            }
            Vector0_1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_1 = stream.ReadStringAligned();
            }
            Vector0_2.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_2 = stream.ReadStringAligned();
            }
            Vector0_3.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_3 = stream.ReadStringAligned();
            }
            Mode1 = stream.ReadInt32();
            VectorComponentCount1 = stream.ReadInt32();
            Color1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                ColorLabel1 = stream.ReadStringAligned();
            }
            Vector1_0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_0 = stream.ReadStringAligned();
            }
            Vector1_1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_1 = stream.ReadStringAligned();
            }
            Vector1_2.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_2 = stream.ReadStringAligned();
            }
            Vector1_3.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_3 = stream.ReadStringAligned();
            }
        }
Пример #5
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Mode0 = (ParticleSystemCustomDataMode)reader.ReadInt32();
            VectorComponentCount0 = reader.ReadInt32();
            Color0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                ColorLabel0 = reader.ReadString();
            }
#endif
            Vector0_0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_0 = reader.ReadString();
            }
#endif
            Vector0_1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_1 = reader.ReadString();
            }
#endif
            Vector0_2.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_2 = reader.ReadString();
            }
#endif
            Vector0_3.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_3 = reader.ReadString();
            }
#endif
            Mode1 = (ParticleSystemCustomDataMode)reader.ReadInt32();
            VectorComponentCount1 = reader.ReadInt32();
            Color1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                ColorLabel1 = reader.ReadString();
            }
#endif
            Vector1_0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_0 = reader.ReadString();
            }
#endif
            Vector1_1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_1 = reader.ReadString();
            }
#endif
            Vector1_2.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_2 = reader.ReadString();
            }
#endif
            Vector1_3.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_3 = reader.ReadString();
            }
#endif
        }