From 886b2f54e572fefeb61ff31b163219a526791f3a Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sun, 16 Jul 2023 13:03:49 -0500 Subject: [PATCH] chore: Update to Bevy 0.11. --- Cargo.toml | 4 ++-- examples/hello_world.rs | 9 +++------ src/lib.rs | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a0cff24..f6b07f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,12 +17,12 @@ speech_dispatcher_0_11 = ["tts/speech_dispatcher_0_11"] tolk = ["tts/tolk"] [dependencies] -bevy = { version = "0.10", default-features = false } +bevy = { version = "0.11", default-features = false } crossbeam-channel = "0.5" tts = { version = "0.25", default-features = false } [dev-dependencies] -bevy = { version = "0.10", default-features = true } +bevy = { version = "0.11", default-features = true } [package.metadata.release] publish = false diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 5321448..e8396c6 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -3,12 +3,9 @@ use bevy_tts::*; fn main() { App::new() - .add_plugins(DefaultPlugins) - .add_plugin(bevy_tts::TtsPlugin) - .add_system(bevy::window::close_on_esc) - .add_startup_system(setup) - .add_system(event_poll) - .add_system(greet) + .add_plugins((DefaultPlugins, bevy_tts::TtsPlugin)) + .add_systems(Startup, setup) + .add_systems(Update, (bevy::window::close_on_esc, event_poll, greet)) .run(); } diff --git a/src/lib.rs b/src/lib.rs index 8a67026..5dab707 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ impl Tts { } } -#[derive(Debug)] +#[derive(Event, Debug)] pub enum TtsEvent { UtteranceBegin(UtteranceId), UtteranceEnd(UtteranceId), @@ -58,6 +58,6 @@ impl Plugin for TtsPlugin { app.add_event::() .insert_resource(TtsChannel(rx)) .insert_resource(tts) - .add_system(poll_callbacks); + .add_systems(Update, poll_callbacks); } }