mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-16 22:12:36 -06:00
refactor: build decoupled input processing & add event queue system
This commit is contained in:
12
src/game/events.rs
Normal file
12
src/game/events.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use crate::input::commands::GameCommand;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum GameEvent {
|
||||
InputCommand(GameCommand),
|
||||
}
|
||||
|
||||
impl From<GameCommand> for GameEvent {
|
||||
fn from(command: GameCommand) -> Self {
|
||||
GameEvent::InputCommand(command)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user