fix first slidermover derping

This commit is contained in:
yugecin 2016-11-20 23:52:28 +01:00
parent 6e4d34b3c5
commit bf517eeb07

View File

@ -268,20 +268,18 @@ public class Dancer {
} }
return; return;
} }
GameObject p = null; GameObject p = d;
if (objectIndex > 0) { if (objectIndex > 0) {
p = gameObjects[objectIndex - 1]; p = gameObjects[objectIndex - 1];
}
GameObject[] e = sliderMoverController.process(p, c, MusicController.getPosition()); GameObject[] e = sliderMoverController.process(p, c, MusicController.getPosition());
p = e[0]; p = e[0];
c = e[1]; c = e[1];
} if (mover == null || p == d) {
if (mover == null || mover.getEnd() != c) {
if (objectIndex == 0) {
mover = new LinearMover(d, c, dir); mover = new LinearMover(d, c, dir);
} else { } else if (mover.getEnd() != c) {
mover = moverFactory.create(p, c, dir); mover = moverFactory.create(p, c, dir);
} }
} }
}
} }