diff --git a/README.md b/README.md index 015b8e7..a061f24 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ More information here: https://bevy-cheatbook.github.io/setup/cross/linux-window - https://pixabay.com/sound-effects/data-transmission-sound-from-14664-72309 - https://pixabay.com/sound-effects/thrusters-loopwav-14699 - https://pixabay.com/sound-effects/rocket-loop-99748 +- https://pixabay.com/sound-effects/350cc-bike-firing-32391 - Star chart based on the [HYG Stellar database](https://github.com/astronexus/HYG-Database) - Custom font Yupiter is based on: - Noto Sans Symbols 2, Copyright 2022 The Noto Project Authors (https://github.com/notofonts/symbols) diff --git a/assets/sounds/bikestart.ogg b/assets/sounds/bikestart.ogg new file mode 100644 index 0000000..6eadcb6 Binary files /dev/null and b/assets/sounds/bikestart.ogg differ diff --git a/src/audio.rs b/src/audio.rs index 48b3673..9880b49 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -12,6 +12,7 @@ const ASSET_BGM: &str = "external/Ben Prunty - FTL - 12 Void (Explore).mp3"; const ASSET_THRUSTER: &str = "sounds/thruster.ogg"; const ASSET_ROCKET: &str = "sounds/rocket.ogg"; const ASSET_WAKEUP: &str = "sounds/wakeup.ogg"; +const ASSET_BIKESTART: &str = "sounds/bikestart.ogg"; pub struct AudioPlugin; impl Plugin for AudioPlugin { @@ -48,6 +49,7 @@ pub enum Sfx { #[derive(Resource)] pub struct SoundIncomingMessage(Handle); #[derive(Resource)] pub struct SoundPing(Handle); #[derive(Resource)] pub struct SoundConnect(Handle); +#[derive(Resource)] pub struct SoundBikeStart(Handle); pub fn setup( mut commands: Commands, @@ -111,6 +113,7 @@ pub fn setup( commands.insert_resource(SoundIncomingMessage(asset_server.load(ASSET_INCOMING_MESSAGE))); commands.insert_resource(SoundPing(asset_server.load(ASSET_PING))); commands.insert_resource(SoundConnect(asset_server.load(ASSET_CONNECT))); + commands.insert_resource(SoundBikeStart(asset_server.load(ASSET_BIKESTART))); } pub fn toggle_bgm( @@ -140,6 +143,7 @@ pub fn play_sfx( sound_incoming_message: Res, sound_ping: Res, sound_connect: Res, + sound_bikestart: Res, ) { if settings.mute_sfx && !events_sfx.is_empty() { events_sfx.clear(); @@ -156,7 +160,7 @@ pub fn play_sfx( Sfx::IncomingChatMessage => sound_incoming_message.0.clone(), Sfx::Ping => sound_ping.0.clone(), Sfx::Connect => sound_connect.0.clone(), - Sfx::EnterVehicle => sound_switch.0.clone(), + Sfx::EnterVehicle => sound_bikestart.0.clone(), Sfx::None => sound_ping.0.clone(), }, settings: PlaybackSettings::DESPAWN,