feather
feather copied to clipboard
DynamicBundler, quill spawn entity shorthand
A spawn function which is similar to hecs::World::spawn
trait DynamicBundle {
fn add_to_builder(self, builder: &mut EntityBuilder);
}
// Should be a macro
impl<T1> DynamicBundle for (T1,) where T1: Component {}
impl<T1, T2> DynamicBundle for (T1, T2) where T1: Component, T2: Component {}
struct ECS {
fn spawn(bundle: impl DynamicBundle) -> Entity;
fn insert_event_with_components(event: impl Component, bundle: impl DynamicBundle) -> Entity;
}