basic_game_events/
input.rs1use crate::commands::Commands;
2use crate::topic_ids::TopicIds;
3use pubsub_bus::*;
4
5#[allow(dead_code)] pub struct Input {
7 device: String, emitter: EventEmitter<Commands, TopicIds>,
9}
10
11impl Input {
12 pub fn new() -> Self {
13 Self {
14 device: "keyboard".to_string(),
15 emitter: EventEmitter::new(),
16 }
17 }
18}
19
20impl Publisher<Commands, TopicIds> for Input {
21 fn get_mut_emitter(&mut self) -> &mut EventEmitter<Commands, TopicIds> {
22 &mut self.emitter
23 }
24}