mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-16 02:12:28 -06:00
fix: flush world after switching to observer-based item collection
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user