more sound effects
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::{BackbackSwapEvent, Backpack, BackpackHead};
|
||||
use crate::{GameState, heads_ui::HeadsImages, loading_assets::UIAssets};
|
||||
use crate::{GameState, heads_ui::HeadsImages, loading_assets::UIAssets, sounds::PlaySound};
|
||||
use bevy::prelude::*;
|
||||
|
||||
static HEAD_SLOTS: usize = 5;
|
||||
@@ -270,6 +270,7 @@ fn swap_head_inputs(
|
||||
let action = *trigger.event();
|
||||
if action == BackpackAction::OpenClose {
|
||||
state.open = !state.open;
|
||||
commands.trigger(PlaySound::Backpack { open: state.open });
|
||||
}
|
||||
|
||||
if !state.open {
|
||||
@@ -290,6 +291,7 @@ fn swap_head_inputs(
|
||||
}
|
||||
|
||||
if changed {
|
||||
commands.trigger(PlaySound::Selection);
|
||||
sync(&backpack, &mut state);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user