Fix use_system()
This commit is contained in:
parent
d96aca59af
commit
52da5428fb
|
@ -28,9 +28,9 @@ impl DeferredSystem {
|
||||||
unsafe impl Send for DeferredSystem {}
|
unsafe impl Send for DeferredSystem {}
|
||||||
unsafe impl Sync for DeferredSystem {}
|
unsafe impl Sync for DeferredSystem {}
|
||||||
|
|
||||||
pub fn new_deferred_system<S>(system: S, world: &mut World) -> (DeferredSystem, Arc<()>)
|
pub fn new_deferred_system<S, M>(system: S, world: &mut World) -> (DeferredSystem, Arc<()>)
|
||||||
where
|
where
|
||||||
S: IntoSystem<(), (), ()> + 'static,
|
S: IntoSystem<(), (), M> + 'static,
|
||||||
{
|
{
|
||||||
let id = world.register_system(system);
|
let id = world.register_system(system);
|
||||||
let ref_count = Arc::new(());
|
let ref_count = Arc::new(());
|
||||||
|
|
|
@ -38,9 +38,9 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn use_system<S>(cx: &ScopeState, system: S) -> DeferredSystem
|
pub fn use_system<S, M>(cx: &ScopeState, system: S) -> DeferredSystem
|
||||||
where
|
where
|
||||||
S: IntoSystem<(), (), ()> + 'static,
|
S: IntoSystem<(), (), M> + 'static,
|
||||||
{
|
{
|
||||||
cx.use_hook(|| new_deferred_system(system, EcsContext::get_world(cx)))
|
cx.use_hook(|| new_deferred_system(system, EcsContext::get_world(cx)))
|
||||||
.0
|
.0
|
||||||
|
|
Loading…
Reference in a new issue