Example #1
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add("mode", (int)Mode);
            if (IsReadTimeMode(container.ExportVersion))
            {
                node.Add("timeMode", (int)TimeMode);
                node.Add("fps", FPS);
            }
            node.Add("frameOverTime", FrameOverTime.ExportYAML(container));
            node.Add("startFrame", GetExportStartFrame(container.Version).ExportYAML(container));
            if (IsReadSpeedRange(container.ExportVersion))
            {
                node.Add("speedRange", SpeedRange.ExportYAML(container));
            }
            node.Add("tilesX", TilesX);
            node.Add("tilesY", TilesY);
            node.Add("animationType", (int)AnimationType);
            node.Add("rowIndex", RowIndex);
            node.Add("cycles", Cycles);
            node.Add("uvChannelMask", GetExportUvChannelMask(container.Version));
            node.Add("flipU", FlipU);
            node.Add("flipV", FlipV);
            node.Add("randomRow", RandomRow);
            node.Add("sprites", GetExportSprites(container.Version).ExportYAML(container));
            return(node);
        }
Example #2
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(ModeName, (int)Mode);
            if (IsReadTimeMode(container.ExportVersion))
            {
                node.Add(TimeModeName, (int)TimeMode);
                node.Add(FpsName, FPS);
            }
            node.Add(FrameOverTimeName, FrameOverTime.ExportYAML(container));
            node.Add(StartFrameName, GetExportStartFrame(container.Version).ExportYAML(container));
            if (IsReadSpeedRange(container.ExportVersion))
            {
                node.Add(SpeedRangeName, SpeedRange.ExportYAML(container));
            }
            node.Add(TilesXName, TilesX);
            node.Add(TilesYName, TilesY);
            node.Add(AnimationTypeName, (int)AnimationType);
            node.Add(RowIndexName, RowIndex);
            node.Add(CyclesName, Cycles);
            node.Add(UvChannelMaskName, GetExportUvChannelMask(container.Version));
            node.Add(FlipUName, FlipU);
            node.Add(FlipVName, FlipV);
            if (IsReadRowMode(container.ExportVersion))
            {
                node.Add(RowModeName, (int)RowMode);
            }
            else
            {
                node.Add(RandomRowName, RandomRow);
            }
            node.Add(SpritesName, GetExportSprites(container.Version).ExportYAML(container));
            return(node);
        }