Trait oxygengine_core::ecs::System [−][src]
A System
, executed with a set of required Resource
s.
Associated Types
type SystemData: DynamicSystemData<'a>
[src]
The resource bundle required to execute this system.
You will mostly use a tuple of system data (which also implements
SystemData
). You can also create such a resource bundle by simply
deriving SystemData
for a struct.
Every SystemData
is also a DynamicSystemData
.
Required methods
pub fn run(&mut self, data: Self::SystemData)
[src]
Executes the system with the required system data.
Provided methods
pub fn running_time(&self) -> RunningTime
[src]
Returns a hint how long the system needs for running. This is used to optimize the way they’re executed (might allow more parallelization).
Defaults to RunningTime::Average
.
pub fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
[src]
Return the accessor from the SystemData
.
pub fn setup(&mut self, world: &mut World)
[src]
Sets up the World
using Self::SystemData::setup
.
pub fn dispose(self, world: &mut World)
[src]
Performs clean up that requires resources from the World
.
This commonly removes components from world
which depend on external
resources.
Implementations on Foreign Types
impl<'a, P> System<'a> for HierarchySystem<P> where
P: Component + Parent + Send + Sync + 'static,
<P as Component>::Storage: Tracked,
[src]
P: Component + Parent + Send + Sync + 'static,
<P as Component>::Storage: Tracked,
type SystemData = (ParentData<'a, P>, Write<'a, Hierarchy<P>, PanicHandler>)
pub fn run(&mut self, <HierarchySystem<P> as System<'a>>::SystemData)
[src]
Implementors
impl<'a, '_, '_> System<'a> for DefaultBatchControllerSystem<'_, '_>
[src]
type SystemData = BatchUncheckedWorld<'a>
pub fn run(
&mut self,
data: <DefaultBatchControllerSystem<'_, '_> as System<'a>>::SystemData
)
[src]
&mut self,
data: <DefaultBatchControllerSystem<'_, '_> as System<'a>>::SystemData
)
pub fn running_time(&self) -> RunningTime
[src]
pub fn accessor(
&'c self
) -> AccessorCow<'a, 'c, DefaultBatchControllerSystem<'_, '_>>
[src]
&'c self
) -> AccessorCow<'a, 'c, DefaultBatchControllerSystem<'_, '_>>
pub fn setup(&mut self, world: &mut World)
[src]
impl<'s> System<'s> for AssetsSystem
[src]
type SystemData = Option<Write<'s, AssetsDatabase>>
fn run(&mut self, data: Self::SystemData)
[src]
impl<'s> System<'s> for LocalizationSystem
[src]
type SystemData = (ReadExpect<'s, AssetsDatabase>, Write<'s, Localization>)
fn run(&mut self, (assets, localization): Self::SystemData)
[src]
impl<'s> System<'s> for PrefabSystem
[src]
type SystemData = (Read<'s, EntitiesRes>, Read<'s, LazyUpdate>, ReadExpect<'s, AppLifeCycle>, ReadExpect<'s, AssetsDatabase>, Write<'s, PrefabManager>)
fn run(
&mut self,
(entities, lazy_update, lifecycle, assets, prefabs): Self::SystemData
)
[src]
&mut self,
(entities, lazy_update, lifecycle, assets, prefabs): Self::SystemData
)