leak.ogg: play depressurization sound effect when taking off helmet
This commit is contained in:
parent
d8786b1c13
commit
f866e9e76a
3 changed files with 5 additions and 0 deletions
BIN
assets/sounds/leak.ogg
Normal file
BIN
assets/sounds/leak.ogg
Normal file
Binary file not shown.
|
@ -78,6 +78,7 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
|
||||||
Sfx::IncomingChatMessage,
|
Sfx::IncomingChatMessage,
|
||||||
"sounds/connect.ogg",
|
"sounds/connect.ogg",
|
||||||
),
|
),
|
||||||
|
(SfxType::OneOff, Sfx::Leak, "sounds/leak.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Ping, "sounds/connect.ogg"),
|
(SfxType::OneOff, Sfx::Ping, "sounds/connect.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Phone, "sounds/phone.ogg"),
|
(SfxType::OneOff, Sfx::Phone, "sounds/phone.ogg"),
|
||||||
(SfxType::OneOff, Sfx::PowerDown, "sounds/powerdown.ogg"),
|
(SfxType::OneOff, Sfx::PowerDown, "sounds/powerdown.ogg"),
|
||||||
|
@ -111,6 +112,7 @@ pub enum Sfx {
|
||||||
Honk,
|
Honk,
|
||||||
IncomingChatMessage,
|
IncomingChatMessage,
|
||||||
Ion,
|
Ion,
|
||||||
|
Leak,
|
||||||
Ping,
|
Ping,
|
||||||
Phone,
|
Phone,
|
||||||
PowerDown,
|
PowerDown,
|
||||||
|
@ -137,6 +139,7 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
|
||||||
"zoom" => Sfx::Zoom,
|
"zoom" => Sfx::Zoom,
|
||||||
"cat" => Sfx::Cat,
|
"cat" => Sfx::Cat,
|
||||||
"chat" => Sfx::IncomingChatMessage,
|
"chat" => Sfx::IncomingChatMessage,
|
||||||
|
"leak" => Sfx::Leak,
|
||||||
"ping" => Sfx::Ping,
|
"ping" => Sfx::Ping,
|
||||||
"phone" => Sfx::Phone,
|
"phone" => Sfx::Phone,
|
||||||
"powerdown" => Sfx::PowerDown,
|
"powerdown" => Sfx::PowerDown,
|
||||||
|
|
|
@ -339,6 +339,7 @@ fn handle_player_death(
|
||||||
q_noscenes: Query<Entity, (With<world::DespawnOnPlayerDeath>, Without<SceneInstance>)>,
|
q_noscenes: Query<Entity, (With<world::DespawnOnPlayerDeath>, Without<SceneInstance>)>,
|
||||||
mut scene_spawner: ResMut<SceneSpawner>,
|
mut scene_spawner: ResMut<SceneSpawner>,
|
||||||
mut active_asteroids: ResMut<world::ActiveAsteroids>,
|
mut active_asteroids: ResMut<world::ActiveAsteroids>,
|
||||||
|
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||||
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
|
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
|
||||||
mut ew_deathscreen: EventWriter<menu::DeathScreenEvent>,
|
mut ew_deathscreen: EventWriter<menu::DeathScreenEvent>,
|
||||||
mut log: ResMut<hud::Log>,
|
mut log: ResMut<hud::Log>,
|
||||||
|
@ -363,6 +364,7 @@ fn handle_player_death(
|
||||||
|
|
||||||
match death.0 {
|
match death.0 {
|
||||||
actor::DamageType::Depressurization => {
|
actor::DamageType::Depressurization => {
|
||||||
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Leak));
|
||||||
settings.death_cause = "Depressurization".to_string();
|
settings.death_cause = "Depressurization".to_string();
|
||||||
ew_effect.send(visual::SpawnEffectEvent {
|
ew_effect.send(visual::SpawnEffectEvent {
|
||||||
class: visual::Effects::FadeIn(Color::BLACK),
|
class: visual::Effects::FadeIn(Color::BLACK),
|
||||||
|
|
Loading…
Add table
Reference in a new issue