diff --git a/README.md b/README.md index 95f644e..3af9790 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,15 @@ a game for the bevy jam 4 - [x] end screen (win/lose) - [x] restart game - [x] main menu with image - - [ ] sound and music + - [x] music + - [ ] tutorial text + - [x] fullscreen + - [ ] sounds (ui, entities) - [ ] other river types + bridges - [ ] other spirit behaviour - [ ] playtesting and bugfixing (lun) - - [ ] review settings menu + - [x] review settings menu - [ ] profiling and optimization - [ ] presentation (lun) diff --git a/assets/music/background_music.ogg b/assets/music/background_music.ogg new file mode 100644 index 0000000..0a5dde1 Binary files /dev/null and b/assets/music/background_music.ogg differ diff --git a/assets/music/soundscape.ogg b/assets/music/soundscape.ogg deleted file mode 100644 index 44aa521..0000000 Binary files a/assets/music/soundscape.ogg and /dev/null differ diff --git a/src/audio.rs b/src/audio.rs index c0a76a3..fb9db69 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -1,5 +1,6 @@ +use crate::{load::GameAssets, GameState}; use bevy::prelude::*; -use bevy_kira_audio::prelude::AudioPlugin as KiraAudioPlugin; +use bevy_kira_audio::{prelude::AudioPlugin as KiraAudioPlugin, prelude::*}; // ······ // Plugin @@ -10,8 +11,8 @@ pub struct AudioPlugin; impl Plugin for AudioPlugin { fn build(&self, app: &mut App) { app.add_plugins(KiraAudioPlugin) - /*.add_systems(OnEnter(GameState::Play), init_music) - .add_systems(OnExit(GameState::Play), pause_music)*/ + .add_systems(OnEnter(GameState::Play), init_music) + .add_systems(OnExit(GameState::Play), pause_music) .init_resource::(); } } @@ -22,15 +23,15 @@ impl Plugin for AudioPlugin { #[derive(Resource, Default)] struct MusicHandles { - //ambient_music: Option>, + ambient_music: Option>, } // ······· // Systems // ······· -/*fn init_music( - assets: Res, +fn init_music( + assets: Res, audio: Res