Skip to main content

advancing

Function advancing 

Source
pub(super) fn advancing<T: 'static>(
    tick: impl FnMut(&mut T, &World, &mut Frame) + 'static,
) -> OnFrame
Expand description

The behaviour that advances the T of the entity it is spawned on.

An object spawns its component and this behaviour as one bundle, so the component is found on the behaviour’s own entity rather than by reaching for a well-known one, and every run looks it up afresh: the behaviour outlives no component and borrows none between runs.