Exemplo n.º 1
0
        public void Write(AssetWriter writer)
        {
            Sprites.Write(writer);
            if (SpriteMetaData.HasOutline(writer.Version))
            {
                Outline.Write(writer);
            }
            if (SpriteMetaData.HasPhysicsShape(writer.Version))
            {
                PhysicsShape.Write(writer);
            }
            if (SpriteMetaData.HasBones(writer.Version))
            {
                Bones.Write(writer);
                writer.Write(SpriteID);
            }
            if (SpriteMetaData.HasInternalID(writer.Version))
            {
                writer.Write(InternalID);
            }
            if (SpriteMetaData.HasBones(writer.Version))
            {
                Vertices.Write(writer);
                Indices.Write(writer);
                Edges.Write(writer);
                writer.AlignStream();

                Weights.Write(writer);
                writer.AlignStream();
            }
            if (HasSecondaryTextures(writer.Version))
            {
                SecondaryTextures.Write(writer);
            }
        }
Exemplo n.º 2
0
        public void Write(AssetWriter writer)
        {
            writer.Write(Name);
            Rect.Write(writer);
            writer.Write((int)Alignment);
            Pivot.Write(writer);
            if (HasBorder(writer.Version))
            {
                Border.Write(writer);
            }
            if (HasOutline(writer.Version))
            {
                Outline.Write(writer);
            }
            if (HasPhysicsShape(writer.Version))
            {
                PhysicsShape.Write(writer);
            }
            if (HasTessellationDetail(writer.Version))
            {
                writer.Write(TessellationDetail);
            }
            if (HasBones(writer.Version))
            {
                Bones.Write(writer);
                writer.Write(SpriteID);
            }
            if (HasInternalID(writer.Version))
            {
                writer.Write(InternalID);
            }
            if (HasBones(writer.Version))
            {
                Vertices.Write(writer);
                Indices.Write(writer);
                Edges.Write(writer);
                writer.AlignStream();

                Weights.Write(writer);
                writer.AlignStream();
            }
        }