musicplayer: actively disables playback if jukebox is on

This commit is contained in:
minjaesong
2024-01-22 03:19:31 +09:00
parent 49ff7e8cf0
commit f5715c69ee
5 changed files with 61 additions and 29 deletions

View File

@@ -28,7 +28,7 @@ import org.dyn4j.geometry.Vector2
/**
* Created by minjaesong on 2024-01-11.
*/
class FixtureJukebox : Electric {
class FixtureJukebox : Electric, PlaysMusic {
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 2, 3),
@@ -83,7 +83,7 @@ class FixtureJukebox : Electric {
// supress the normal background music playback
if (musicIsPlaying && !flagDespawn) {
(INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic()
// (INGAME.musicGovernor as TerrarumMusicGovernor).stopMusic()
}
}

View File

@@ -0,0 +1,8 @@
package net.torvald.terrarum.modulebasegame.gameactors
/**
* A "marker" interface for fixtures that can play music.
*/
interface PlaysMusic {
}