mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-09 22:07:53 -06:00
24 lines
486 B
Rust
24 lines
486 B
Rust
use bevy_ecs::prelude::*;
|
|
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
pub enum GameCommand {
|
|
Exit,
|
|
MovePlayer(crate::entity::direction::Direction),
|
|
ToggleDebug,
|
|
MuteAudio,
|
|
ResetLevel,
|
|
TogglePause,
|
|
}
|
|
|
|
#[derive(Event, Clone, Copy, Debug, PartialEq, Eq)]
|
|
pub enum GameEvent {
|
|
Command(GameCommand),
|
|
Collision(Entity, Entity),
|
|
}
|
|
|
|
impl From<GameCommand> for GameEvent {
|
|
fn from(command: GameCommand) -> Self {
|
|
GameEvent::Command(command)
|
|
}
|
|
}
|