示例#1
0
        public void Write(AssetWriter writer)
        {
            GradientLayout layout = writer.Layout.Serialized.Gradient;

            if (layout.Version == 1)
            {
                Key0_32.Write(writer);
                Key1_32.Write(writer);
                Key2_32.Write(writer);
                Key3_32.Write(writer);
                Key4_32.Write(writer);
                Key5_32.Write(writer);
                Key6_32.Write(writer);
                Key7_32.Write(writer);
            }
            else
            {
                Key0.Write(writer);
                Key1.Write(writer);
                Key2.Write(writer);
                Key3.Write(writer);
                Key4.Write(writer);
                Key5.Write(writer);
                Key6.Write(writer);
                Key7.Write(writer);
            }

            writer.Write(Ctime0);
            writer.Write(Ctime1);
            writer.Write(Ctime2);
            writer.Write(Ctime3);
            writer.Write(Ctime4);
            writer.Write(Ctime5);
            writer.Write(Ctime6);
            writer.Write(Ctime7);
            writer.Write(Atime0);
            writer.Write(Atime1);
            writer.Write(Atime2);
            writer.Write(Atime3);
            writer.Write(Atime4);
            writer.Write(Atime5);
            writer.Write(Atime6);
            writer.Write(Atime7);
            if (layout.HasMode)
            {
                writer.Write((int)Mode);
            }

            writer.Write(NumColorKeys);
            writer.Write(NumAlphaKeys);
            writer.AlignStream();
        }
示例#2
0
        public void Write(AssetWriter writer)
        {
            if (IsColor32(writer.Version))
            {
                Key0.Write32(writer);
                Key1.Write32(writer);
                Key2.Write32(writer);
                Key3.Write32(writer);
                Key4.Write32(writer);
                Key5.Write32(writer);
                Key6.Write32(writer);
                Key7.Write32(writer);
            }
            else
            {
                Key0.Write(writer);
                Key1.Write(writer);
                Key2.Write(writer);
                Key3.Write(writer);
                Key4.Write(writer);
                Key5.Write(writer);
                Key6.Write(writer);
                Key7.Write(writer);
            }

            writer.Write(Ctime0);
            writer.Write(Ctime1);
            writer.Write(Ctime2);
            writer.Write(Ctime3);
            writer.Write(Ctime4);
            writer.Write(Ctime5);
            writer.Write(Ctime6);
            writer.Write(Ctime7);
            writer.Write(Atime0);
            writer.Write(Atime1);
            writer.Write(Atime2);
            writer.Write(Atime3);
            writer.Write(Atime4);
            writer.Write(Atime5);
            writer.Write(Atime6);
            writer.Write(Atime7);
            if (HasMode(writer.Version))
            {
                writer.Write((int)Mode);
            }

            writer.Write(NumColorKeys);
            writer.Write(NumAlphaKeys);
            writer.AlignStream();
        }