Smoother health bar changes.

Also merged GameScore update calls into a single method.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-12-30 01:17:05 -05:00
parent b0649541eb
commit 3127571886
2 changed files with 28 additions and 16 deletions

View File

@@ -490,7 +490,7 @@ public class Game extends BasicGameState {
}
}
score.updateScoreDisplay(delta);
score.updateDisplays(delta);
// map complete!
if (objectIndex >= osu.objects.length) {
@@ -517,10 +517,8 @@ public class Game extends BasicGameState {
}
// song beginning
if (objectIndex == 0) {
if (trackPosition < osu.objects[0].getTime())
return; // nothing to do here
}
if (objectIndex == 0 && trackPosition < osu.objects[0].getTime())
return; // nothing to do here
// break periods
if (osu.breaks != null && breakIndex < osu.breaks.size()) {
@@ -554,8 +552,6 @@ public class Game extends BasicGameState {
game.enterState(Opsu.STATE_GAMEPAUSEMENU);
}
score.updateComboBurst(delta);
// drain health
score.changeHealth(delta * -1 * GameScore.HP_DRAIN_MULTIPLIER);
if (!score.isAlive()) {