fly_b/simul/
start.rs

1use bevy::prelude::*;
2
3#[derive(Debug, Default)]
4pub struct SimulStartPlugin {
5    _priv_fields_placeholder: (),
6}
7impl Plugin for SimulStartPlugin {
8    fn build(&self, app: &mut App) {
9        app.add_event::<events::SimulStart>()
10            .add_systems(Startup, sys::announce);
11    }
12}
13
14pub mod events {
15    use bevy::prelude::*;
16
17    #[derive(Debug, Event)]
18    pub struct SimulStart {
19        _priv_fields_placeholder: (),
20    }
21
22    impl SimulStart {
23        pub fn new() -> Self {
24            Self {
25                _priv_fields_placeholder: (),
26            }
27        }
28    }
29}
30pub mod sys {
31    use bevy::prelude::*;
32
33    pub fn announce(mut announcer: EventWriter<crate::SimulStart>) {
34        announcer.send(crate::SimulStart::new());
35    }
36}