beet_core 0.0.8

Core utilities and types for other beet crates
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::prelude::*;
use bevy::ecs::schedule::ScheduleLabel;



#[extend::ext(name=ScheduleLabelExt)]
pub impl<T: Default + ScheduleLabel> T {
	/// Convert a [`ScheduleLabel`] into an exclusive system, running it once.
	fn run() -> impl Fn(&mut World) {
		move |world: &mut World| {
			world.run_schedule(T::default());
		}
	}
}