Laser speed now accounts for scrolling speed in demo game

This commit is contained in:
Viktor Lidholt
2015-09-03 16:02:44 -07:00
parent d1a5661195
commit 876fb7b38b

View File

@@ -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;