macro_rules! transit_system {
($name:ident: $from:ty => $to:ty, |$var:ident| $how:expr) => { ... };
}Expand description
Usefull when you have one component, and want to have another, built on given one. Like this:
ⓘ
transit_system!(Glutin2HeavySystem: RenderData => HeavyGuiData,
|render_data| { HeavyGuiData::new(&mut render_data.facade.borrow_mut() ) });With this system, HeavyGuiData will automatically be added to entities with RenderData.