From 876fb7b38b25dfa2b383ed1c8506caba6d3c8584 Mon Sep 17 00:00:00 2001 From: Viktor Lidholt Date: Thu, 3 Sep 2015 16:02:44 -0700 Subject: [PATCH] Laser speed now accounts for scrolling speed in demo game --- examples/game/lib/game_objects.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/game/lib/game_objects.dart b/examples/game/lib/game_objects.dart index dd136be184..d670eab0b0 100644 --- a/examples/game/lib/game_objects.dart +++ b/examples/game/lib/game_objects.dart @@ -173,7 +173,9 @@ class Laser extends GameObject { impact = 1.0 + level * 0.5; // Offset for movement - _offset = new Offset(math.cos(radians(r)) * 10.0, math.sin(radians(r)) * 10.0); + _offset = new Offset( + math.cos(radians(r)) * 8.0, + math.sin(radians(r)) * 8.0 - f.playerState.scrollSpeed); // Drawing properties rotation = r + 90.0;