Move animation curves into a Curves namespace
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user