also animate logo shrink when a song is playing
This commit is contained in:
parent
8d7b7ef567
commit
fcf5fc5eaf
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user