Move animation curves into a Curves namespace

This commit is contained in:
Adam Barth
2015-10-19 18:08:52 -07:00
parent 529fa95f87
commit f79fdff2d0
19 changed files with 58 additions and 53 deletions

View File

@@ -67,14 +67,14 @@ class TestBed extends NodeWithSize {
// Animate obstacle
ActionSequence seq = new ActionSequence([
new ActionTween((a) => _obstacle.position = a, new Point(256.0, 800.0), new Point(768.0, 800.0), 1.0, easeInOut),
new ActionTween((a) => _obstacle.position = a, new Point(768.0, 800.0), new Point(256.0, 800.0), 1.0, easeInOut)
new ActionTween((a) => _obstacle.position = a, new Point(256.0, 800.0), new Point(768.0, 800.0), 1.0, Curves.easeInOut),
new ActionTween((a) => _obstacle.position = a, new Point(768.0, 800.0), new Point(256.0, 800.0), 1.0, Curves.easeInOut)
]);
_obstacle.actions.run(new ActionRepeatForever(seq));
seq = new ActionSequence([
new ActionTween((a) => _obstacle.scale = a, 1.0, 2.0, 2.0, easeInOut),
new ActionTween((a) => _obstacle.scale = a, 2.0, 1.0, 2.0, easeInOut)
new ActionTween((a) => _obstacle.scale = a, 1.0, 2.0, 2.0, Curves.easeInOut),
new ActionTween((a) => _obstacle.scale = a, 2.0, 1.0, 2.0, Curves.easeInOut)
]);
_obstacle.actions.run(new ActionRepeatForever(seq));