bevy/src/input/mod.rs

21 lines
407 B
Rust
Raw Normal View History

2020-04-04 21:59:49 +00:00
pub mod keyboard;
2020-04-05 06:42:39 +00:00
pub mod mouse;
2020-04-04 21:59:49 +00:00
use crate::{app::AppBuilder, prelude::AppPlugin};
use keyboard::KeyboardInput;
2020-04-05 06:42:39 +00:00
use mouse::MouseInput;
2020-04-04 21:59:49 +00:00
#[derive(Default)]
pub struct InputPlugin;
impl AppPlugin for InputPlugin {
fn build(&self, app: AppBuilder) -> AppBuilder {
app.add_event::<KeyboardInput>()
2020-04-05 06:42:39 +00:00
.add_event::<MouseInput>()
2020-04-04 21:59:49 +00:00
}
fn name(&self) -> &str {
"Input"
}
}