The music for a specific building only starts on setup, and setup is only called the first time the character enters a building, including the Quad.
A simple fix could check the music in the draw function, and switch the played track if the wrong one is playing for the given building.
A more sophisticated idea: further abstract the music, such that it is played by an ever-present object loaded from sketch.js. This would also allow a permanent mute/unmute button that the player could use. The different screens would then inform this new object the room changed.
The music for a specific building only starts on
setup, andsetupis only called the first time the character enters a building, including the Quad.A simple fix could check the music in the
drawfunction, and switch the played track if the wrong one is playing for the given building.A more sophisticated idea: further abstract the music, such that it is played by an ever-present object loaded from
sketch.js. This would also allow a permanent mute/unmute button that the player could use. The different screens would then inform this new object the room changed.