Struct amethyst_input::InputSystem
source · Expand description
Input system
Will read winit::Event
from EventHandler<winit::Event>
, process them with InputHandler
,
and push the results in EventHandler<InputEvent>
.
Implementations
Trait Implementations
sourceimpl<'a, AX, AC> System<'a> for InputSystem<AX, AC>where
AX: Hash + Eq + Clone + Send + Sync + 'static,
AC: Hash + Eq + Clone + Send + Sync + 'static,
impl<'a, AX, AC> System<'a> for InputSystem<AX, AC>where
AX: Hash + Eq + Clone + Send + Sync + 'static,
AC: 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>)
type SystemData = (Read<'a, EventChannel<Event>, DefaultProvider>, Write<'a, InputHandler<AX, AC>, DefaultProvider>, Write<'a, EventChannel<InputEvent<AC>>, DefaultProvider>)
The resource bundle required to execute this system. Read more
sourcefn run(&mut self, (input, handler, output): Self::SystemData)
fn run(&mut self, (input, handler, output): Self::SystemData)
Executes the system with the required system
data. Read more
fn running_time(&self) -> RunningTime
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). Read more
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the [
SystemData
].Auto Trait Implementations
impl<AX, AC> !RefUnwindSafe for InputSystem<AX, AC>
impl<AX, AC> Send for InputSystem<AX, AC>where
AC: Send,
AX: Send,
impl<AX, AC> Sync for InputSystem<AX, AC>where
AC: Sync,
AX: Sync,
impl<AX, AC> Unpin for InputSystem<AX, AC>where
AC: Unpin,
AX: Unpin,
impl<AX, AC> !UnwindSafe for InputSystem<AX, AC>
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moreimpl<T> Pointable for T
impl<T> Pointable for T
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
fn setup(&mut self, res: &mut Resources)
fn setup(&mut self, res: &mut Resources)
Sets up
Resources
for a later call to run
.fn run(&mut self, res: &'a Resources, _: &ThreadPool)
fn run(&mut self, res: &'a Resources, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more