mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 05:54:05 +09:00
musicplayer: actively disables playback if jukebox is on
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
/**
|
||||
* A "marker" interface for fixtures that can play music.
|
||||
*/
|
||||
interface PlaysMusic {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user