diff options
author | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2023-03-07 15:27:19 +0100 |
---|---|---|
committer | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2023-03-07 15:27:19 +0100 |
commit | d1c5bcfece967039c18c1eff744cb5e353bb4c4c (patch) | |
tree | d935c535df40e3d29d5549ae1078f52f291d86c9 /examples/chat/client.rs | |
parent | 265696e477c7eda6e56c60be3a14773844f6e1aa (diff) |
[examples] Update to bevy 0.10 API
Diffstat (limited to 'examples/chat/client.rs')
-rw-r--r-- | examples/chat/client.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/chat/client.rs b/examples/chat/client.rs index fae4976..990efa4 100644 --- a/examples/chat/client.rs +++ b/examples/chat/client.rs @@ -8,8 +8,8 @@ use bevy::{ app::{AppExit, ScheduleRunnerPlugin}, log::LogPlugin, prelude::{ - info, warn, App, Commands, CoreStage, Deref, DerefMut, EventReader, EventWriter, Res, - ResMut, Resource, + info, warn, App, Commands, CoreSet, Deref, DerefMut, EventReader, EventWriter, + IntoSystemConfig, Res, ResMut, Resource, }, }; use bevy_quinnet::{ @@ -128,7 +128,10 @@ fn start_connection(mut client: ResMut<Client>) { // You can already send message(s) even before being connected, they will be buffered. In this example we will wait for a ConnectionEvent. } -fn handle_client_events(connection_events: EventReader<ConnectionEvent>, client: ResMut<Client>) { +fn handle_client_events( + mut connection_events: EventReader<ConnectionEvent>, + client: ResMut<Client>, +) { if !connection_events.is_empty() { // We are connected let username: String = rand::thread_rng() @@ -160,7 +163,7 @@ fn main() { .add_system(handle_terminal_messages) .add_system(handle_server_messages) .add_system(handle_client_events) - // CoreStage::PostUpdate so that AppExit events generated in the previous stage are available - .add_system_to_stage(CoreStage::PostUpdate, on_app_exit) + // CoreSet::PostUpdate so that AppExit events generated in the previous stage are available + .add_system(on_app_exit.in_base_set(CoreSet::PostUpdate)) .run(); } |