feat: implement generic optimized collision system

This commit is contained in:
2025-08-15 12:21:29 -05:00
parent c5d6ea28e1
commit 57d7f75940
12 changed files with 242 additions and 46 deletions

View File

@@ -1,10 +1,19 @@
use bevy_ecs::event::Event;
use bevy_ecs::prelude::*;
use crate::systems::input::GameCommand;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum GameCommand {
Exit,
MovePlayer(crate::entity::direction::Direction),
ToggleDebug,
MuteAudio,
ResetLevel,
TogglePause,
}
#[derive(Debug, Clone, Copy, Event)]
#[derive(Event, Clone, Copy, Debug, PartialEq, Eq)]
pub enum GameEvent {
Command(GameCommand),
Collision(Entity, Entity),
}
impl From<GameCommand> for GameEvent {