Trait cogs_gamedev::controls::InputHandler[][src]

pub trait InputHandler<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> {
    fn pressed(&self, control: C) -> bool;
fn released(&self, control: C) -> bool;
fn clicked_down(&self, control: C) -> bool; }
Expand description

The InputHandler trait, makng sure that both styles of input handling expose the same API.

Required methods

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?

Implementors