Added a listener for the end of music tracks.
Fixes a bug during gameplay where if the music track ends before the last hit object is processed (esp. spinners), the game would hang. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -152,11 +152,9 @@ public class Spinner implements HitObject {
|
||||
@Override
|
||||
public boolean update(boolean overlap, int delta, int mouseX, int mouseY) {
|
||||
int trackPosition = MusicController.getPosition();
|
||||
if (overlap)
|
||||
return true;
|
||||
|
||||
// end of spinner
|
||||
if (trackPosition > hitObject.getEndTime()) {
|
||||
if (overlap || trackPosition > hitObject.getEndTime()) {
|
||||
hitResult();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user