qsdf
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user