pub fn execute(&mut self, world: &mut World, resources: &mut Resources) {
        let mut waiting_flush: Vec<&mut Executor> = Vec::new();
        let mut thread_local_systems: Vec<&mut Box<dyn Runnable>> = Vec::new();
        for step in &mut self.steps {
            match step {
                Step::Systems(executor) => {
                    executor.run_systems(world, resources);
                    waiting_flush.push(executor);
                }
                Step::FlushCmdBuffers => {
                    waiting_flush
                        .drain(..)
                        .for_each(|e| e.flush_command_buffers(world));
                    thread_local_systems.drain(..).for_each(|system| {
                        system.command_buffer_mut(world.id()).unwrap().write(world)
                    });
                }
                Step::ThreadLocalFn(function) => function(world, resources),
                Step::ThreadLocalSystem(system) => {
                    system.run(world, resources);
                    if system.command_buffer_mut(world.id()).is_some() {
                        thread_local_systems.push(system)
                    }
                }
            }
        }
    }
/// Executes all of the steps in the schedule.
Executes all of the steps in the schedule.
Executes all of the steps in the schedule .
pub fn execute(&mut self, world: &mut World, resources: &mut Resources) {
        let mut waiting_flush: Vec<&mut Executor> = Vec::new();
        let mut thread_local_systems: Vec<&mut Box<dyn Runnable>> = Vec::new();
        for step in &mut self.steps {
            match step {
                Step::Systems(executor) => {
                    executor.run_systems(world, resources);
                    waiting_flush.push(executor);
                }
                Step::FlushCmdBuffers => {
                    waiting_flush
                        .drain(..)
                        .for_each(|e| e.flush_command_buffers(world));
                    thread_local_systems.drain(..).for_each(|system| {
                        system.command_buffer_mut(world.id()).unwrap().write(world)
                    });
                }
                Step::ThreadLocalFn(function) => function(world, resources),
                Step::ThreadLocalSystem(system) => {
                    system.run(world, resources);
                    if system.command_buffer_mut(world.id()).is_some() {
                        thread_local_systems.push(system)
                    }
                }
            }
        }
    }
pub fn execute ( & mut self , world : & mut World , resources : & mut Resources ) { let mut waiting_flush : Vec < & mut Executor > = Vec :: new ( ) ; let mut thread_local_systems : Vec < & mut Box < dyn Runnable > > = Vec :: new ( ) ; for step in & mut self . steps { match step { Step :: Systems ( executor ) => { executor . run_systems ( world , resources ) ; waiting_flush . push ( executor ) ; } Step :: FlushCmdBuffers => { waiting_flush . drain ( .. ) . for_each ( | e | e . flush_command_buffers ( world ) ) ; thread_local_systems . drain ( .. ) . for_each ( | system | { system . command_buffer_mut ( world . id ( ) ) . unwrap ( ) . write ( world ) } ) ; } Step :: ThreadLocalFn ( function ) => function ( world , resources ) , Step :: ThreadLocalSystem ( system ) => { system . run ( world , resources ) ; if system . command_buffer_mut ( world . id ( ) ) . is_some ( ) { thread_local_systems . push ( system ) } } } } }
Executes all of the steps in the schedule.
Executes all of the steps in the schedule .
&mut self
world
&mut World
resources
&mut Resources
&mut self
world
&mut World
resources
&mut Resources