Trait amethyst::ecs::prelude::System [−]
pub trait System<'a> {
type SystemData: DynamicSystemData<'a>;
fn run(&mut self, data: Self::SystemData);
fn running_time(&self) -> RunningTime { ... }
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self> { ... }
fn setup(&mut self, res: &mut Resources) { ... }
}A System, executed with a set of required Resources.
Associated Types
type SystemData: DynamicSystemData<'a>
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
fn run(&mut self, data: Self::SystemData)
Executes the system with the required system data.
Provided Methods
fn running_time(&self) -> RunningTime
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.
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the [SystemData].
fn setup(&mut self, res: &mut Resources)
Sets up the Resources using Self::SystemData::setup.
Implementations on Foreign Types
impl<'a> System<'a> for VertexSkinningSystem[src]
impl<'a> System<'a> for VertexSkinningSystemtype SystemData = (Storage<'a, Joint, Fetch<'a, MaskedStorage<Joint>>>, Storage<'a, GlobalTransform, Fetch<'a, MaskedStorage<GlobalTransform>>>, Storage<'a, Skin, Fetch<'a, MaskedStorage<Skin>>>, Storage<'a, JointTransforms, FetchMut<'a, MaskedStorage<JointTransforms>>>)
fn run(&mut self, <VertexSkinningSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <VertexSkinningSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a, T> System<'a> for SamplerInterpolationSystem<T> where
T: AnimationSampling + Component, [src]
impl<'a, T> System<'a> for SamplerInterpolationSystem<T> where
T: AnimationSampling + Component, type SystemData = (Read<'a, Time, DefaultProvider>, Read<'a, AssetStorage<Sampler<<T as AnimationSampling>::Primitive>>, DefaultProvider>, Storage<'a, SamplerControlSet<T>, FetchMut<'a, MaskedStorage<SamplerControlSet<T>>>>, Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>, <T as ApplyData<'a>>::ApplyData)
fn run(&mut self, <SamplerInterpolationSystem<T> as System<'a>>::SystemData)[src]
fn run(&mut self, <SamplerInterpolationSystem<T> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a, I, T> System<'a> for AnimationControlSystem<I, T> where
I: PartialEq<I> + Eq + Hash + Copy + Send + Sync + 'static,
T: AnimationSampling + Component + Clone, [src]
impl<'a, I, T> System<'a> for AnimationControlSystem<I, T> where
I: PartialEq<I> + Eq + Hash + Copy + Send + Sync + 'static,
T: AnimationSampling + Component + Clone, type SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Read<'a, AssetStorage<Animation<T>>, DefaultProvider>, Read<'a, AssetStorage<Sampler<<T as AnimationSampling>::Primitive>>, DefaultProvider>, Storage<'a, AnimationControlSet<I, T>, FetchMut<'a, MaskedStorage<AnimationControlSet<I, T>>>>, Storage<'a, SamplerControlSet<T>, FetchMut<'a, MaskedStorage<SamplerControlSet<T>>>>, Storage<'a, AnimationHierarchy<T>, Fetch<'a, MaskedStorage<AnimationHierarchy<T>>>>, Storage<'a, T, Fetch<'a, MaskedStorage<T>>>, Storage<'a, RestState<T>, FetchMut<'a, MaskedStorage<RestState<T>>>>, <T as ApplyData<'a>>::ApplyData)
fn run(
&mut self,
data: <AnimationControlSystem<I, T> as System<'a>>::SystemData
)[src]
fn run(
&mut self,
data: <AnimationControlSystem<I, T> as System<'a>>::SystemData
)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for HotReloadSystem[src]
impl<'a> System<'a> for HotReloadSystemtype SystemData = (Read<'a, Time, DefaultProvider>, Write<'a, HotReloadStrategy, DefaultProvider>)
fn run(&mut self, <HotReloadSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <HotReloadSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a, A> System<'a> for Processor<A> where
A: Asset,
<A as Asset>::Data: Into<Result<A, Error>>, [src]
impl<'a, A> System<'a> for Processor<A> where
A: Asset,
<A as Asset>::Data: Into<Result<A, Error>>, type SystemData = (Write<'a, AssetStorage<A>, DefaultProvider>, Read<'a, Arc<ThreadPool>, PanicHandler>, Read<'a, Time, DefaultProvider>, Option<Read<'a, HotReloadStrategy, DefaultProvider>>)
fn run(&mut self, <Processor<A> as System<'a>>::SystemData)[src]
fn run(&mut self, <Processor<A> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for TransformSystem[src]
impl<'a> System<'a> for TransformSystemtype SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Read<'a, Hierarchy<Parent>, PanicHandler>, Storage<'a, Transform, Fetch<'a, MaskedStorage<Transform>>>, Storage<'a, Parent, Fetch<'a, MaskedStorage<Parent>>>, Storage<'a, GlobalTransform, FetchMut<'a, MaskedStorage<GlobalTransform>>>)
fn run(&mut self, <TransformSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <TransformSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a, P> System<'a> for HierarchySystem<P> where
P: Component + Parent + Send + Sync + 'static,
<P as Component>::Storage: Tracked,
impl<'a, P> System<'a> for HierarchySystem<P> where
P: Component + Parent + Send + Sync + 'static,
<P as Component>::Storage: Tracked, type SystemData = (ParentData<'a, P>, Write<'a, Hierarchy<P>, HierarchySetupHandler<P>>)
fn run(&mut self, <HierarchySystem<P> as System<'a>>::SystemData)
fn run(&mut self, <HierarchySystem<P> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for VisibilitySortingSystem[src]
impl<'a> System<'a> for VisibilitySortingSystemtype SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Write<'a, Visibility, DefaultProvider>, Option<Read<'a, ActiveCamera, DefaultProvider>>, Storage<'a, Camera, Fetch<'a, MaskedStorage<Camera>>>, Storage<'a, Transparent, Fetch<'a, MaskedStorage<Transparent>>>, Storage<'a, GlobalTransform, Fetch<'a, MaskedStorage<GlobalTransform>>>)
fn run(&mut self, <VisibilitySortingSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <VisibilitySortingSystem as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a, F, R> System<'a> for DjSystem<F, R> where
F: FnMut(&mut R) -> Option<Handle<Source>>,
R: Resource, [src]
impl<'a, F, R> System<'a> for DjSystem<F, R> where
F: FnMut(&mut R) -> Option<Handle<Source>>,
R: Resource, type SystemData = (Read<'a, AssetStorage<Source>, DefaultProvider>, Read<'a, Errors, DefaultProvider>, Option<Read<'a, AudioSink, DefaultProvider>>, Write<'a, R, PanicHandler>)
fn run(&mut self, <DjSystem<F, R> as System<'a>>::SystemData)[src]
fn run(&mut self, <DjSystem<F, R> as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for AudioSystem[src]
impl<'a> System<'a> for AudioSystemtype SystemData = (Option<Read<'a, SelectedListener, DefaultProvider>>, Read<'a, EntitiesRes, DefaultProvider>, Storage<'a, GlobalTransform, Fetch<'a, MaskedStorage<GlobalTransform>>>, Storage<'a, AudioListener, Fetch<'a, MaskedStorage<AudioListener>>>, Storage<'a, AudioEmitter, FetchMut<'a, MaskedStorage<AudioEmitter>>>)
fn run(&mut self, <AudioSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <AudioSystem as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for MouseCenterLockSystem[src]
impl<'a> System<'a> for MouseCenterLockSystemtype SystemData = (Read<'a, ScreenDimensions, PanicHandler>, Write<'a, WindowMessages, DefaultProvider>, Write<'a, WindowFocus, DefaultProvider>)
fn run(&mut self, <MouseCenterLockSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <MouseCenterLockSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a, A, B> System<'a> for FlyMovementSystem<A, B> where
A: Send + Sync + Hash + Eq + Clone + 'static,
B: Send + Sync + Hash + Eq + Clone + 'static, [src]
impl<'a, A, B> System<'a> for FlyMovementSystem<A, B> where
A: Send + Sync + Hash + Eq + Clone + 'static,
B: Send + Sync + Hash + Eq + Clone + 'static, type SystemData = (Read<'a, Time, DefaultProvider>, Storage<'a, Transform, FetchMut<'a, MaskedStorage<Transform>>>, Read<'a, InputHandler<A, B>, DefaultProvider>, Storage<'a, FlyControlTag, Fetch<'a, MaskedStorage<FlyControlTag>>>)
fn run(&mut self, <FlyMovementSystem<A, B> as System<'a>>::SystemData)[src]
fn run(&mut self, <FlyMovementSystem<A, B> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a, A, B> System<'a> for FreeRotationSystem<A, B> where
A: Send + Sync + Hash + Eq + Clone + 'static,
B: Send + Sync + Hash + Eq + Clone + 'static, [src]
impl<'a, A, B> System<'a> for FreeRotationSystem<A, B> where
A: Send + Sync + Hash + Eq + Clone + 'static,
B: Send + Sync + Hash + Eq + Clone + 'static, type SystemData = (Read<'a, InputHandler<A, B>, DefaultProvider>, Read<'a, WindowFocus, DefaultProvider>, Read<'a, ScreenDimensions, PanicHandler>, Storage<'a, Transform, FetchMut<'a, MaskedStorage<Transform>>>, Storage<'a, FlyControlTag, Fetch<'a, MaskedStorage<FlyControlTag>>>)
fn run(&mut self, <FreeRotationSystem<A, B> as System<'a>>::SystemData)[src]
fn run(&mut self, <FreeRotationSystem<A, B> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for MouseFocusUpdateSystem[src]
impl<'a> System<'a> for MouseFocusUpdateSystemtype SystemData = (Read<'a, EventChannel<Event>, DefaultProvider>, Write<'a, WindowFocus, DefaultProvider>)
fn run(&mut self, <MouseFocusUpdateSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <MouseFocusUpdateSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for ArcBallMovementSystem[src]
impl<'a> System<'a> for ArcBallMovementSystemtype SystemData = (Storage<'a, Transform, FetchMut<'a, MaskedStorage<Transform>>>, Storage<'a, ArcBallControlTag, Fetch<'a, MaskedStorage<ArcBallControlTag>>>)
fn run(&mut self, <ArcBallMovementSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <ArcBallMovementSystem as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a, AX, AC> System<'a> for InputSystem<AX, AC> where
AC: Hash + Eq + Clone + Send + Sync + 'static,
AX: Hash + Eq + Clone + Send + Sync + 'static, [src]
impl<'a, AX, AC> System<'a> for InputSystem<AX, AC> where
AC: Hash + Eq + Clone + Send + Sync + 'static,
AX: Hash + Eq + Clone + Send + Sync + 'static, type SystemData = (Read<'a, EventChannel<Event>, DefaultProvider>, Write<'a, InputHandler<AX, AC>, DefaultProvider>, Write<'a, EventChannel<InputEvent<AC>>, DefaultProvider>)
fn run(&mut self, <InputSystem<AX, AC> as System<'a>>::SystemData)[src]
fn run(&mut self, <InputSystem<AX, AC> as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for UiSystem[src]
impl<'a> System<'a> for UiSystemtype SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Storage<'a, UiText, FetchMut<'a, MaskedStorage<UiText>>>, Storage<'a, TextEditing, FetchMut<'a, MaskedStorage<TextEditing>>>, Storage<'a, UiTransform, Fetch<'a, MaskedStorage<UiTransform>>>, Write<'a, UiFocused, DefaultProvider>, Read<'a, EventChannel<Event>, DefaultProvider>, Read<'a, Time, DefaultProvider>)
fn run(&mut self, <UiSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <UiSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a, A, B> System<'a> for UiMouseSystem<A, B> where
A: Send + Sync + Eq + Hash + Clone + 'static,
B: Send + Sync + Eq + Hash + Clone + 'static, [src]
impl<'a, A, B> System<'a> for UiMouseSystem<A, B> where
A: Send + Sync + Eq + Hash + Clone + 'static,
B: Send + Sync + Eq + Hash + Clone + 'static, type SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Storage<'a, UiTransform, Fetch<'a, MaskedStorage<UiTransform>>>, Storage<'a, MouseReactive, Fetch<'a, MaskedStorage<MouseReactive>>>, Read<'a, InputHandler<A, B>, DefaultProvider>, Write<'a, EventChannel<UiEvent>, DefaultProvider>)
fn run(&mut self, <UiMouseSystem<A, B> as System<'a>>::SystemData)[src]
fn run(&mut self, <UiMouseSystem<A, B> as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for ResizeSystem[src]
impl<'a> System<'a> for ResizeSystemtype SystemData = (Storage<'a, UiTransform, FetchMut<'a, MaskedStorage<UiTransform>>>, Storage<'a, UiResize, FetchMut<'a, MaskedStorage<UiResize>>>, Read<'a, EventChannel<Event>, DefaultProvider>)
fn run(&mut self, <ResizeSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <ResizeSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for UiParentSystem[src]
impl<'a> System<'a> for UiParentSystemtype SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Storage<'a, UiTransform, FetchMut<'a, MaskedStorage<UiTransform>>>, Storage<'a, Parent, Fetch<'a, MaskedStorage<Parent>>>, Storage<'a, Anchored, Fetch<'a, MaskedStorage<Anchored>>>, Storage<'a, Stretched, Fetch<'a, MaskedStorage<Stretched>>>, Read<'a, ScreenDimensions, PanicHandler>, Read<'a, Hierarchy<Parent>, PanicHandler>)
fn run(&mut self, data: <UiParentSystem as System<'a>>::SystemData)[src]
fn run(&mut self, data: <UiParentSystem as System<'a>>::SystemData)fn setup(&mut self, res: &mut Resources)[src]
fn setup(&mut self, res: &mut Resources)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>impl<'a> System<'a> for UiLayoutSystem[src]
impl<'a> System<'a> for UiLayoutSystemtype SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Storage<'a, UiTransform, FetchMut<'a, MaskedStorage<UiTransform>>>, Storage<'a, Anchored, FetchMut<'a, MaskedStorage<Anchored>>>, Storage<'a, Parent, Fetch<'a, MaskedStorage<Parent>>>, Read<'a, ScreenDimensions, PanicHandler>)
fn run(&mut self, <UiLayoutSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <UiLayoutSystem as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)impl<'a> System<'a> for FPSCounterSystem[src]
impl<'a> System<'a> for FPSCounterSystemtype SystemData = (Read<'a, Time, DefaultProvider>, Write<'a, FPSCounter, DefaultProvider>)
fn run(&mut self, <FPSCounterSystem as System<'a>>::SystemData)[src]
fn run(&mut self, <FPSCounterSystem as System<'a>>::SystemData)fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTimefn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)Implementors
impl<'a, T, F> System<'a> for Merge<F> where
F: Future<Item = T, Error = BoxedErr> + Component + Send + Sync,
T: Component + Send + Sync + 'static, type SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Read<'a, Errors, DefaultProvider>, Storage<'a, F, FetchMut<'a, MaskedStorage<F>>>, Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>);