The AnimationChain class is used to animate multiple Animatables.
Those animatables are animated one after the other and the onComplete callback is called when the last animatable has completed.
See also: Juggler, AnimationChain, Animatable
Examples:
var ac = new AnimationChain();
ac.add(new Tween(sprite, 2.0, Transition.easeOutBounce)..animate.x.to(700));
ac.add(new Tween(sprite, 2.0, Transition.linear)..animate.y.to(500));
ac.delay = 1.0;
ac.onStart = () => print("start");
ac.onComplete = () => print("complete");
juggler.add(ac);
juggler.addChain([
new Tween(sprite, 2.0, Transition.easeOutBounce)..animate.x.to(700),
new Tween(sprite, 2.0, Transition.linear)..animate.y.to(500)])
..onComplete = () => print("complete");
- Implements
-
- Animatable
Constructors
Properties
- delay → num
-
The delay this
AnimatableChain
waits until it starts animating.read / write - hashCode → int
-
Get a hash code for this object.
read-only, inherited - isComplete → bool
-
Indicates if this
AnimatableChain
is completed.read-only - onComplete →
-
The function that is called when an
AnimationChain
is completed.write-only - onStart →
-
The function that is called when an
AnimationChain
starts.write-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
add(
Animatable animatable) → void -
Adds the
animatable
to this AnimationChain. -
advanceTime(
num time) → bool -
This method is called by the
Juggler
with thetime
past since the last call. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited