Follow-up to #214: cleanup.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2016-12-19 21:02:01 -05:00
parent 0f936d32cb
commit 90a2f1d2f2
6 changed files with 102 additions and 117 deletions

View File

@@ -257,17 +257,15 @@ public class MainMenu extends BasicGameState {
exitButton.draw();
}
// logo
// draw logo (pulsing)
Float position = MusicController.getBeatProgress();
if (position == null) {
if (position == null) // default to 60bpm
position = System.currentTimeMillis() % 1000 / 1000f;
}
float scale = 1f + position * 0.05f;
logo.draw(Color.white, scale);
Image ghostLogo = GameImage.MENU_LOGO.getImage().getScaledCopy(logo.getCurrentScale() / scale * 1.05f);
float scaleposmodx = ghostLogo.getWidth() / 2;
float scaleposmody = ghostLogo.getHeight() / 2;
ghostLogo.draw(logo.getX() - scaleposmodx, logo.getY() - scaleposmody, Colors.GHOST_LOGO);
float ghostScale = logo.getLastScale() / scale * 1.05f;
Image ghostLogo = GameImage.MENU_LOGO.getImage().getScaledCopy(ghostScale);
ghostLogo.drawCentered(logo.getX(), logo.getY(), Colors.GHOST_LOGO);
// draw music buttons
if (MusicController.isPlaying())