fix: flush world after switching to observer-based item collection

This commit is contained in:
Ryan Walters
2025-09-10 21:43:23 -05:00
parent d84f0c831e
commit d7a6ee7684
5 changed files with 21 additions and 22 deletions

View File

@@ -3,6 +3,7 @@
include!(concat!(env!("OUT_DIR"), "/atlas_data.rs"));
use std::collections::HashMap;
use std::ops::Not;
use tracing::{debug, info, trace, warn};
use crate::constants::{self, animation, MapTile, CANVAS_SIZE};
@@ -510,7 +511,7 @@ impl Game {
(|mut dirty: ResMut<RenderDirty>, score: Res<ScoreResource>, stage: Res<GameStage>| {
dirty.0 = score.is_changed() || stage.is_changed();
}),
dirty_render_system.run_if(|dirty: Res<RenderDirty>| dirty.0 == false),
dirty_render_system.run_if(|dirty: Res<RenderDirty>| dirty.0.not()),
combined_render_system,
hud_render_system,
touch_ui_render_system,

View File

@@ -162,7 +162,7 @@ pub fn ghost_collision_observer(
// Request transition via event so stage_system can process it
stage_events.write(StageTransition::GhostEatenPause {
ghost_entity: ghost,
ghost_type: ghost_type,
ghost_type,
});
// Play eat sound