gate sound

volume down on music
This commit is contained in:
2025-03-09 20:22:35 +01:00
parent da7bbaa64a
commit 7bc6995e18
4 changed files with 23 additions and 1 deletions

View File

@@ -9,6 +9,8 @@ mod tb_entities;
use avian3d::PhysicsPlugins;
use avian3d::prelude::*;
use bevy::audio::PlaybackMode;
use bevy::audio::Volume;
use bevy::core_pipeline::tonemapping::Tonemapping;
use bevy::prelude::*;
use bevy::render::view::ColorGrading;
@@ -133,7 +135,14 @@ fn spawn_box(
}
fn music(asset_server: Res<AssetServer>, mut commands: Commands) {
commands.spawn(AudioPlayer::new(asset_server.load("sfx/music/02.ogg")));
commands.spawn((
AudioPlayer::new(asset_server.load("sfx/music/02.ogg")),
PlaybackSettings {
mode: PlaybackMode::Loop,
volume: Volume::new(0.2),
..default()
},
));
}
fn write_trenchbroom_config(server: Res<TrenchBroomServer>) {