Creates a new tween action. The setter will be called to update the
animated property from startVal to endVal over the duration
time in
seconds. Optionally an animation curve
can be passed in for easing the
animation.
// Animate myNode from its current position to 100.0, 100.0 during
// 1.0 second and a bounceOut easing
var myTween = new ActionTween(
(a) => myNode.position = a,
myNode.position,
new Point(100.0, 100.0,
1.0,
bounceOut
);
myNode.actions.run(myTween);
Source
ActionTween(this.setter, this.startVal, this.endVal, double duration, [Curve curve]) : super(duration, curve) { _computeDelta(); }