change flashlight sound to "switch"

This commit is contained in:
yuni 2024-05-08 06:42:35 +02:00
parent 83966bf452
commit c2124180f6

View file

@ -240,7 +240,7 @@ pub fn update_power(
battery.power -= 4000000.0 * d;
if battery.power <= 0.0 {
settings.flashlight_active = false;
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
for mut flashlight_vis in &mut q_flashlight {
*flashlight_vis = Visibility::Hidden;
}
@ -364,7 +364,7 @@ pub fn handle_input(
}
else if keyboard_input.just_pressed(settings.key_flashlight) {
for mut flashlight_vis in &mut q_flashlight {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
if *flashlight_vis == Visibility::Hidden {
*flashlight_vis = Visibility::Visible;
settings.flashlight_active = true;