use crate::{log_step, prelude::*};
pub trait AppExt {
fn add_step<M>(&mut self, step: u32, system: impl IntoSystem<(), (), M>) -> &mut Self;
}
impl AppExt for App {
fn add_step<M>(&mut self, step: u32, system: impl IntoSystem<(), (), M>) -> &mut Self {
self.add_systems(
PostUpdate,
system.run_if(in_state(Step(step))).after(log_step),
)
}
}