Skip to content

Commit

Permalink
fix: Fix audio session retrieval to use SessionNames + fixup error me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
MaxCWhitehead committed Aug 24, 2024
1 parent 7e94f65 commit e680718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub use music::*;
pub fn game_plugin(game: &mut Game) {
game.init_shared_resource::<AudioCenter>();

let session = match game.sessions.get_mut(DEFAULT_BONES_AUDIO_SESSION) {
let session = match game.sessions.get_mut(SessionNames::AUDIO) {
Some(session) => session,
None => panic!("Audio plugin failed to find `DEFAULT_BONES_AUDIO_SESSION`, make sure jumpy audio plugin is installed after bones default plugins.")
None => panic!("Audio plugin failed to find existing bones audio session, make sure jumpy audio plugin is installed after bones default plugins.")
};

session.stages.add_system_to_stage(First, music_system);
Expand Down

0 comments on commit e680718

Please sign in to comment.