use minifb::Key;
pub struct InputManager {
pub keys: Vec<Key>,
}
impl InputManager {
pub fn new() -> Self {
InputManager {
keys: vec![],
}
}
pub fn add(&mut self, key: Key) {
self.keys.push(key);
}
pub fn wasd(&mut self) {
self.keys.push(Key::W);
self.keys.push(Key::A);
self.keys.push(Key::S);
self.keys.push(Key::D);
}
pub fn arrows(&mut self) {
self.keys.push(Key::Up);
self.keys.push(Key::Left);
self.keys.push(Key::Right);
self.keys.push(Key::Down);
}
}