[][src]Trait coffee::input::Input

pub trait Input {
    fn new() -> Self;
fn update(&mut self, event: Event);
fn clear(&mut self); }

The input of your Game.

If you just want simple access to the keyboard and mouse, check out the built-in KeyboardAndMouse type.

Required methods

fn new() -> Self

Creates a new Input.

fn update(&mut self, event: Event)

Processes an input event.

This function may be called multiple times during event processing, before Game::interact.

fn clear(&mut self)

Clears any temporary state that should be consumed by Game::interact and could accumulate otherwise.

This method will be called after each Game::interact.

Loading content...

Implementations on Foreign Types

impl Input for ()[src]

Loading content...

Implementors

impl Input for Keyboard[src]

impl Input for Mouse[src]

impl Input for KeyboardAndMouse[src]

Loading content...