fix: FruitSprites resource for common tests, disable Exit command bindings on Emscripten, update ROADMAP.md

This commit is contained in:
Ryan Walters
2025-09-10 22:08:32 -05:00
parent d86864b6a3
commit 83e0d1d737
3 changed files with 11 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ A comprehensive list of features needed to complete the Pac-Man emulation, organ
- [x] Fruit Spawning Mechanics
- [x] Spawn at pellet counts 70 and 170
- [ ] Fruit display in bottom-right corner
- [x] Fruit display in bottom-right corner
- [x] Fruit collection and scoring
- [x] Bonus point display system

View File

@@ -85,8 +85,12 @@ impl Default for Bindings {
key_bindings.insert(Keycode::Space, GameCommand::ToggleDebug);
key_bindings.insert(Keycode::M, GameCommand::MuteAudio);
key_bindings.insert(Keycode::R, GameCommand::ResetLevel);
key_bindings.insert(Keycode::Escape, GameCommand::Exit);
key_bindings.insert(Keycode::Q, GameCommand::Exit);
#[cfg(not(target_os = "emscripten"))]
{
key_bindings.insert(Keycode::Escape, GameCommand::Exit);
key_bindings.insert(Keycode::Q, GameCommand::Exit);
}
let movement_keys = HashSet::from([
Keycode::W,

View File

@@ -13,9 +13,9 @@ use pacman::{
graph::{Graph, Node},
},
systems::{
item_collision_observer, AudioEvent, AudioState, BufferedDirection, Collider, DebugState, DeltaTime, EntityType, Ghost,
GhostCollider, GhostState, GlobalState, ItemCollider, MovementModifiers, PacmanCollider, PelletCount, PlayerControlled,
Position, ScoreResource, Velocity,
item_collision_observer, AudioEvent, AudioState, BufferedDirection, Collider, DebugState, DeltaTime, EntityType,
FruitSprites, Ghost, GhostCollider, GhostState, GlobalState, ItemCollider, MovementModifiers, PacmanCollider,
PelletCount, PlayerControlled, Position, ScoreResource, Velocity,
},
texture::sprite::{AtlasMapper, AtlasTile, SpriteAtlas},
};
@@ -83,6 +83,7 @@ pub fn create_test_world() -> (World, Schedule) {
world.insert_resource(Events::<pacman::error::GameError>::default());
world.insert_resource(Events::<AudioEvent>::default());
world.insert_resource(ScoreResource(0));
world.insert_resource(FruitSprites::default());
world.insert_resource(AudioState::default());
world.insert_resource(GlobalState { exit: false });
world.insert_resource(DebugState::default());