musicplayer: buttons are now well-behaving

This commit is contained in:
minjaesong
2024-01-25 18:16:24 +09:00
parent 2832f7123d
commit 3042b0659e
3 changed files with 40 additions and 11 deletions

View File

@@ -111,7 +111,7 @@ class FixtureJukebox : Electric, PlaysMusic {
printdbg(this, "Stop music $title - $artist")
(INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic(pauseLen = Math.random().toFloat() * 30f + 30f)
(INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic(pauseLen = (INGAME.musicGovernor as TerrarumMusicGovernor).getRandomMusicInterval())
}
discCurrentlyPlaying = index
@@ -136,7 +136,7 @@ class FixtureJukebox : Electric, PlaysMusic {
*/
fun stopGracefully() {
stopDiscPlayback()
(INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic(pauseLen = Math.random().toFloat() * 30f + 30f)
(INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic(pauseLen = (INGAME.musicGovernor as TerrarumMusicGovernor).getRandomMusicInterval())
}
override fun drawBody(frameDelta: Float, batch: SpriteBatch) {