leadin delay 2s

This commit is contained in:
yugecin 2016-11-12 19:04:40 +01:00
parent 7276705533
commit ceb6751831

View File

@ -308,6 +308,9 @@ public class Game extends BasicGameState {
int width = container.getWidth();
int height = container.getHeight();
int trackPosition = MusicController.getPosition();
if (isLeadIn()) {
trackPosition -= leadInTime;
}
if (pauseTime > -1) // returning from pause screen
trackPosition = pauseTime;
else if (deathTime > -1) // "Easy" mod: health bar increasing
@ -1357,6 +1360,12 @@ public class Game extends BasicGameState {
MusicController.setPitch(GameMod.getSpeedMultiplier());
MusicController.pause();
if (gameObjects.length > 0) {
int leadIntime = 2000 - gameObjects[0].getTime();
if (leadIntime > 0) {
this.leadInTime = Math.max(leadIntime, this.leadInTime);
}
}
SoundController.mute(false);
}