This commit is contained in:
Back777space
2025-04-06 22:48:41 +02:00
parent cb758681ae
commit 2aa48b191e

View File

@@ -35,6 +35,7 @@ fn main() {
})
.add_systems(OnEnter(GameState::Playing), setup)
.add_systems(OnEnter(GameState::Menu), play_song)
.add_systems(OnExit(GameState::Menu), stop_song)
.run();
}
@@ -86,5 +87,11 @@ fn play_song(
) {
audio.play(audio_assets.theme_song.clone())
.looped()
.with_volume(0.35);
.with_volume(0.20);
}
fn stop_song(
audio: Res<Audio>,
) {
audio.stop();
}