コード例 #1
0
        public SpringAnimatable2D(IAnimatable2D animatable)
        {
            if (animatable == null)
            {
                throw new ArgumentNullException(nameof(animatable));
            }

            this.anim     = animatable;
            this.alpha    = new Spring(anim.Alpha);
            this.rotation = new Spring(anim.Rotation);
            this.position = new Spring2D(anim.Position);
            this.scale    = new Spring2D(anim.Scale);
        }
コード例 #2
0
 public static TweenBuilder2D ScaleTo(this TweenBuilder2D builder, IAnimatable2D target)
 => builder.To(a => builder.Target.Scale = a, builder.Target.Scale, target.Scale);
コード例 #3
0
 public TweenBuilder2D(IAnimatable2D target) : base(target)
 {
 }
コード例 #4
0
 public static TweenBuilder2D MoveTo(this TweenBuilder2D builder, IAnimatable2D target)
 => builder.To(a => builder.Target.Position = a, builder.Target.Position, target.Position);