also animate logo shrink when a song is playing

This commit is contained in:
yugecin 2018-06-26 22:44:50 +02:00
parent 8d7b7ef567
commit fcf5fc5eaf
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44

View File

@ -265,12 +265,12 @@ public class MainMenu extends BaseOpsuState {
boolean renderPiece = position != null; boolean renderPiece = position != null;
if (position == null) { if (position == null) {
position = System.currentTimeMillis() % 1000 / 1000f; position = System.currentTimeMillis() % 1000 / 1000f;
}
if (position < 0.05f) { if (position < 0.05f) {
position = 1f - AnimationEquation.IN_CUBIC.calc(position / 0.05f); position = 1f - AnimationEquation.IN_CUBIC.calc(position / 0.05f);
} else { } else {
position = (position - 0.05f) / 0.95f; position = (position - 0.05f) / 0.95f;
} }
}
logo.draw(color, 0.9726f + position * 0.0274f); logo.draw(color, 0.9726f + position * 0.0274f);
final float hoverScale = logo.getCurrentHoverExpandValue(); final float hoverScale = logo.getCurrentHoverExpandValue();
if (renderPiece) { if (renderPiece) {