Init plugins + first system

This commit is contained in:
Florian RICHER 2025-05-16 14:22:18 +02:00
parent dda368e802
commit 6639f0bb1e
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
4 changed files with 48 additions and 5 deletions

View file

@ -1,4 +1,4 @@
use bevy_app::{App, AppExit};
use bevy_app::{App, AppExit, PluginsState};
use config::WindowConfig;
use raw_handle::{DisplayHandleWrapper, EventLoopProxyWrapper};
use state::WindowState;
@ -35,6 +35,11 @@ impl Window {
}
fn runner(mut app: App, event_loop: EventLoop<()>) -> AppExit {
if app.plugins_state() == PluginsState::Ready {
app.finish();
app.cleanup();
}
app.world_mut()
.insert_resource(EventLoopProxyWrapper::new(event_loop.create_proxy()));