From 6f9fe7b1fe70090ff545ecbd71ab9aa0b85412a0 Mon Sep 17 00:00:00 2001 From: Viktor Lidholt Date: Mon, 19 Oct 2015 12:13:20 -0700 Subject: [PATCH] Updates physics test --- examples/game/test_physics.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/game/test_physics.dart b/examples/game/test_physics.dart index 059acfb8c5..20264f83b4 100644 --- a/examples/game/test_physics.dart +++ b/examples/game/test_physics.dart @@ -55,6 +55,7 @@ class TestBed extends NodeWithSize { _obstacle = new Sprite(_spriteSheet["ship.png"]); _obstacle.position = new Point(512.0, 800.0); _obstacle.size = new Size(64.0, 64.0); + _obstacle.scale = 2.0; _obstacle.physicsBody = new PhysicsBody( new PhysicsShapeCircle(Point.origin, 32.0), type: PhysicsBodyType.static, @@ -71,6 +72,12 @@ class TestBed extends NodeWithSize { ]); _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) + ]); + _obstacle.actions.run(new ActionRepeatForever(seq)); + addChild(_physicsNode); userInteractionEnabled = true;