Skip to main content

step_stepped_world

Function step_stepped_world 

Source
pub fn step_stepped_world(
    host: &World,
    entity: Entity,
    delta_seconds: f32,
) -> Result<StepOutcome, StepError>
Expand description

Drain a stepped world’s jobs and run its tick once with delta_seconds.

A tick that returns false stops the world; a panic, in a job or in the tick, is caught, logged and published as the world’s state, and ends the world too. Both are reported through StepOutcome rather than left for the caller to guess.

The step publishes what the world’s subscriptions collected, the same as a threaded world’s loop does, so a tick body never publishes by hand.

§Errors

Returns StepError::NoWorld when entity names no reachable world proxy, and StepError::NotStepped when it names a threaded world, which drives itself and must not be stepped from here.