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); }
public static TweenBuilder2D ScaleTo(this TweenBuilder2D builder, IAnimatable2D target) => builder.To(a => builder.Target.Scale = a, builder.Target.Scale, target.Scale);
public TweenBuilder2D(IAnimatable2D target) : base(target) { }
public static TweenBuilder2D MoveTo(this TweenBuilder2D builder, IAnimatable2D target) => builder.To(a => builder.Target.Position = a, builder.Target.Position, target.Position);