Update to Bevy 0.8.

This commit is contained in:
Nolan Darilek 2022-08-01 11:02:05 -05:00
parent 5615a28ece
commit def95dcccb
3 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ edition = "2021"
[dependencies]
anyhow = "1"
bevy = { version = "0.7", default-features = false }
bevy = { version = "0.8", default-features = false, features = ["bevy_asset"] }
synthizer = { git = "https://github.com/synthizer/synthizer-rs" }
[dev-dependencies]
bevy = { version = "0.7", default-features = true }
bevy = { version = "0.8", default-features = true }

View File

@ -69,7 +69,7 @@ fn main() {
..default()
})
.add_plugin(SynthizerPlugin)
.add_system(bevy::input::system::exit_on_esc_system)
.add_system(bevy::window::close_on_esc)
.init_resource::<AssetHandles>()
.add_startup_system(setup)
.add_system(load_and_create)

View File

@ -276,10 +276,10 @@ pub fn update_sound_properties(
sound.generator = Some(generator);
}
let translation = global_transform
.map(|v| v.translation)
.map(|v| v.translation())
.or_else(|| transform.map(|v| v.translation));
if sound.source.is_none() {
if let Some(b) = buffers.get(sound.buffer.clone()) {
if let Some(b) = buffers.get(&sound.buffer) {
if let Some(generator) = sound.generator.as_mut() {
generator.buffer().set(&**b).expect("Unable to set buffer");
if let Some(translation) = translation {