public override Animation ToAnimation(EditDataSet editSet, DataSet.AnimationBits bits)
        {
            var ret = new AnimationGradientPattern();

            ret.duration           = (ushort)(duration * 1000); // stored in milliseconds
            ret.speedMultiplier256 = (ushort)(this.speedMultiplier * 256.0f);
            ret.tracksOffset       = (ushort)editSet.getPatternTrackOffset(pattern);
            ret.trackCount         = (ushort)pattern.gradients.Count;

            // Add gradient
            ret.gradientTrackOffset = (ushort)bits.rgbTracks.Count;
            var tempTrack = new EditRGBTrack()
            {
                gradient = gradient
            };
            var gradientTrack = tempTrack.ToTrack(editSet, bits);

            bits.rgbTracks.Add(gradientTrack);
            ret.overrideWithFace = (byte)(overrideWithFace ? 1 : 0);

            return(ret);
        }
Exemplo n.º 2
0
 public AnimationInstanceGradientPattern(AnimationGradientPattern preset, DataSet.AnimationBits bits)
     : base(preset, bits)
 {
 }