single_success_system

Function single_success_system 

Source
pub fn single_success_system<Args, S>(system: S) -> StaticSystem<(), ()>
where S: IntoSystem<Args, (), Option<()>, Sys = StaticSystem<(), Option<()>>>,
Expand description

Wrapper system for single success systems.

Runs the given system each frame until it succeeds (returns Some). Uses Option<()> instead of a bool to allow for easy usage of ?.

System success is tracked with the SingleSuccessSystems resource which can be removed if you wish to let all single success systems run again.