click3.ogg: add new sound for targeting and menu cursor movement
This commit is contained in:
parent
4b42f441dc
commit
6704056d3a
BIN
assets/sounds/click3.ogg
Normal file
BIN
assets/sounds/click3.ogg
Normal file
Binary file not shown.
|
@ -64,6 +64,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
|
|||
(SfxType::OneOff, Sfx::GaspRelief, "sounds/gasprelief.ogg"),
|
||||
(SfxType::OneOff, Sfx::Achieve, "sounds/achieve.ogg"),
|
||||
(SfxType::OneOff, Sfx::Click, "sounds/click.ogg"),
|
||||
(SfxType::OneOff, Sfx::Click3, "sounds/click3.ogg"),
|
||||
(SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"),
|
||||
(SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"),
|
||||
(SfxType::OneOff, Sfx::Drink, "sounds/drink.ogg"),
|
||||
|
@ -89,6 +90,7 @@ pub enum Sfx {
|
|||
BGMActualJupiterRecording,
|
||||
BGMTakeoff,
|
||||
Click,
|
||||
Click3,
|
||||
Connect,
|
||||
Crash,
|
||||
Drink,
|
||||
|
@ -117,6 +119,7 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
|
|||
"exit" => Sfx::ExitVehicle,
|
||||
"honk" => Sfx::Honk,
|
||||
"click" => Sfx::Click,
|
||||
"click3" => Sfx::Click3,
|
||||
"drink" => Sfx::Drink,
|
||||
"woosh" => Sfx::Woosh,
|
||||
"zoom" => Sfx::Zoom,
|
||||
|
|
|
@ -218,6 +218,7 @@ pub fn handle_game_event(
|
|||
}
|
||||
}
|
||||
GameEvent::SetMenu(turn) => {
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
|
||||
settings.menu_active = turn.to_bool(settings.menu_active);
|
||||
for mut window in &mut q_window {
|
||||
window.cursor.grab_mode = if settings.menu_active {
|
||||
|
|
|
@ -1080,7 +1080,6 @@ fn handle_input(
|
|||
|
||||
fn handle_target_event(
|
||||
mut commands: Commands,
|
||||
settings: Res<Settings>,
|
||||
mut er_target: EventReader<TargetEvent>,
|
||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||
mut ew_achievement: EventWriter<game::AchievementEvent>,
|
||||
|
@ -1105,8 +1104,8 @@ fn handle_target_event(
|
|||
}
|
||||
}
|
||||
}
|
||||
if play_sfx && !settings.mute_sfx {
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
|
||||
if play_sfx {
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3));
|
||||
}
|
||||
break; // Only accept a single event per frame
|
||||
}
|
||||
|
|
|
@ -543,7 +543,7 @@ pub fn handle_input(
|
|||
} else {
|
||||
menustate.cursor.saturating_sub(1)
|
||||
};
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3));
|
||||
ew_updatemenu.send(UpdateMenuEvent);
|
||||
}
|
||||
if keyboard_input.just_pressed(settings.key_back)
|
||||
|
@ -555,7 +555,7 @@ pub fn handle_input(
|
|||
} else {
|
||||
menustate.cursor.saturating_add(1)
|
||||
};
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click3));
|
||||
ew_updatemenu.send(UpdateMenuEvent);
|
||||
}
|
||||
if keyboard_input.just_pressed(settings.key_interact)
|
||||
|
|
Loading…
Reference in a new issue