Beispiel #1
0
        public void Read32(AssetReader reader)
        {
            ColorRGBA32 color32 = new ColorRGBA32();

            color32.Read(reader);
            this = (ColorRGBAf)color32;
        }
        public static void GenerateTypeTree(TypeTreeContext context, string name)
        {
            int version = ToSerializedVersion(context.Version);

            context.AddNode(TypeTreeUtils.GradientName, name, 0, version);
            context.BeginChildren();
            if (version == 1)
            {
                ColorRGBA32.GenerateTypeTree(context, Key0Name);
                ColorRGBA32.GenerateTypeTree(context, Key1Name);
                ColorRGBA32.GenerateTypeTree(context, Key2Name);
                ColorRGBA32.GenerateTypeTree(context, Key3Name);
                ColorRGBA32.GenerateTypeTree(context, Key4Name);
                ColorRGBA32.GenerateTypeTree(context, Key5Name);
                ColorRGBA32.GenerateTypeTree(context, Key6Name);
                ColorRGBA32.GenerateTypeTree(context, Key7Name);
            }
            else
            {
                ColorRGBAf.GenerateTypeTree(context, Key0Name);
                ColorRGBAf.GenerateTypeTree(context, Key1Name);
                ColorRGBAf.GenerateTypeTree(context, Key2Name);
                ColorRGBAf.GenerateTypeTree(context, Key3Name);
                ColorRGBAf.GenerateTypeTree(context, Key4Name);
                ColorRGBAf.GenerateTypeTree(context, Key5Name);
                ColorRGBAf.GenerateTypeTree(context, Key6Name);
                ColorRGBAf.GenerateTypeTree(context, Key7Name);
            }

            context.AddInt16(Ctime0Name);
            context.AddInt16(Ctime1Name);
            context.AddInt16(Ctime2Name);
            context.AddInt16(Ctime3Name);
            context.AddInt16(Ctime4Name);
            context.AddInt16(Ctime5Name);
            context.AddInt16(Ctime6Name);
            context.AddInt16(Ctime7Name);

            context.AddInt16(Atime0Name);
            context.AddInt16(Atime1Name);
            context.AddInt16(Atime2Name);
            context.AddInt16(Atime3Name);
            context.AddInt16(Atime4Name);
            context.AddInt16(Atime5Name);
            context.AddInt16(Atime6Name);
            context.AddInt16(Atime7Name);

            if (HasMode(context.Version))
            {
                context.AddInt32(ModeName);
            }
            context.AddByte(NumColorKeysName);
            context.AddByte(NumAlphaKeysName);
            context.EndChildren();
        }
Beispiel #3
0
 public void Add(ushort time, ColorRGBA32 color)
 {
     Add(time, (ColorRGBAf)color);
 }
Beispiel #4
0
        public void Write32(AssetWriter writer)
        {
            ColorRGBA32 color32 = (ColorRGBA32)this;

            color32.Write(writer);
        }