Update to Bevy 0.8.
This commit is contained in:
parent
5615a28ece
commit
def95dcccb
|
@ -9,8 +9,8 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1"
|
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" }
|
synthizer = { git = "https://github.com/synthizer/synthizer-rs" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy = { version = "0.7", default-features = true }
|
bevy = { version = "0.8", default-features = true }
|
|
@ -69,7 +69,7 @@ fn main() {
|
||||||
..default()
|
..default()
|
||||||
})
|
})
|
||||||
.add_plugin(SynthizerPlugin)
|
.add_plugin(SynthizerPlugin)
|
||||||
.add_system(bevy::input::system::exit_on_esc_system)
|
.add_system(bevy::window::close_on_esc)
|
||||||
.init_resource::<AssetHandles>()
|
.init_resource::<AssetHandles>()
|
||||||
.add_startup_system(setup)
|
.add_startup_system(setup)
|
||||||
.add_system(load_and_create)
|
.add_system(load_and_create)
|
||||||
|
|
|
@ -276,10 +276,10 @@ pub fn update_sound_properties(
|
||||||
sound.generator = Some(generator);
|
sound.generator = Some(generator);
|
||||||
}
|
}
|
||||||
let translation = global_transform
|
let translation = global_transform
|
||||||
.map(|v| v.translation)
|
.map(|v| v.translation())
|
||||||
.or_else(|| transform.map(|v| v.translation));
|
.or_else(|| transform.map(|v| v.translation));
|
||||||
if sound.source.is_none() {
|
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() {
|
if let Some(generator) = sound.generator.as_mut() {
|
||||||
generator.buffer().set(&**b).expect("Unable to set buffer");
|
generator.buffer().set(&**b).expect("Unable to set buffer");
|
||||||
if let Some(translation) = translation {
|
if let Some(translation) = translation {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user