mirror of
https://github.com/lightsoutgames/bevy_tts.git
synced 2024-12-21 14:45:57 +00:00
chore: Update to Bevy 0.14.
This commit is contained in:
parent
7ad2070fa9
commit
a6de8e190c
|
@ -17,12 +17,12 @@ speech_dispatcher_0_11 = ["tts/speech_dispatcher_0_11"]
|
|||
tolk = ["tts/tolk"]
|
||||
|
||||
[dependencies]
|
||||
bevy = { version = "0.13", default-features = false }
|
||||
bevy = { version = "0.14", default-features = false }
|
||||
crossbeam-channel = "0.5"
|
||||
tts = { version = "0.26", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.13", default-features = true }
|
||||
bevy = { version = "0.14", default-features = true }
|
||||
|
||||
[package.metadata.release]
|
||||
publish = false
|
||||
|
|
|
@ -5,7 +5,7 @@ fn main() {
|
|||
App::new()
|
||||
.add_plugins((DefaultPlugins, bevy_tts::TtsPlugin))
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, (bevy::window::close_on_esc, event_poll, greet))
|
||||
.add_systems(Update, (event_poll, greet))
|
||||
.run();
|
||||
}
|
||||
|
||||
|
@ -61,14 +61,14 @@ fn setup(mut tts: ResMut<Tts>) {
|
|||
|
||||
// Reports events from TTS subsystem.
|
||||
fn event_poll(mut events: EventReader<TtsEvent>) {
|
||||
for event in events.iter() {
|
||||
for event in events.read() {
|
||||
println!("{:?}", event);
|
||||
}
|
||||
}
|
||||
|
||||
// Shows how to output speech in response to a keypress.
|
||||
fn greet(input: Res<Input<KeyCode>>, mut tts: ResMut<Tts>) {
|
||||
if input.just_pressed(KeyCode::G) {
|
||||
fn greet(input: Res<ButtonInput<KeyCode>>, mut tts: ResMut<Tts>) {
|
||||
if input.just_pressed(KeyCode::KeyG) {
|
||||
tts.speak("Hey there!", true).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user