Struct cogs_gamedev::controls::PollingInputHandler [−][src]
pub struct PollingInputHandler<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> { /* fields omitted */ }
Expand description
Polling-based input handler. See module-level documentation for more.
Implementations
Create a new PollingInputHandler with the specified controls. The HashMap in should map inputs to the controls you want them to actuate.
Trait Implementations
EnumMap doesn’t implement Clone so we do it ourselves
impl<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> InputHandler<I, C> for PollingInputHandler<I, C>
impl<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> InputHandler<I, C> for PollingInputHandler<I, C>
Is this input pressed down? i.e. is the player pressing the button?
Is this input released? i.e. is the player not pressing the button?
Is this input being clicked down? i.e. was it up last frame, but down this frame?
Auto Trait Implementations
impl<I, C> RefUnwindSafe for PollingInputHandler<I, C> where
C: RefUnwindSafe,
I: RefUnwindSafe,
<C as Enum<u32>>::Array: RefUnwindSafe,
impl<I, C> Send for PollingInputHandler<I, C> where
C: Send,
I: Send,
<C as Enum<u32>>::Array: Send,
impl<I, C> Sync for PollingInputHandler<I, C> where
C: Sync,
I: Sync,
<C as Enum<u32>>::Array: Sync,
impl<I, C> Unpin for PollingInputHandler<I, C> where
C: Unpin,
I: Unpin,
<C as Enum<u32>>::Array: Unpin,
impl<I, C> UnwindSafe for PollingInputHandler<I, C> where
C: UnwindSafe,
I: UnwindSafe,
<C as Enum<u32>>::Array: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V