use bevy::app::HierarchyPropagatePlugin;
use crate::prelude::*;
#[derive(Default, Debug)]
pub struct ScreenPlugin;
impl Plugin for ScreenPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<ScreenRegistry>();
app.init_resource::<InitialScreen>();
app.add_message::<SwitchToScreenMsg>();
app.add_plugins((
HierarchyPropagatePlugin::<Persistent>::new(PostUpdate),
HierarchyPropagatePlugin::<ScreenScoped>::new(PostUpdate),
));
app.add_plugins(super::systems::plugin);
}
}