fix: correctly unhide in second pre-freeze stage

This commit is contained in:
Ryan Walters
2025-09-01 10:28:08 -05:00
parent 66499b6285
commit 2bd0edd2ad

View File

@@ -79,15 +79,19 @@ pub fn startup_stage_system(
if let Some((from, to)) = startup.tick() {
debug!("StartupSequence transition from {from:?} to {to:?}");
match (from, to) {
// (StartupSequence::TextOnly { .. }, StartupSequence::CharactersVisible { .. }) => {}
(StartupSequence::CharactersVisible { .. }, StartupSequence::GameActive) => {
// Unfreeze and unhide the player & ghosts
(StartupSequence::TextOnly { .. }, StartupSequence::CharactersVisible { .. }) => {
// Unhide the player & ghosts
for entity in player_query.iter_mut().chain(ghost_query.iter_mut()) {
commands.entity(entity).remove::<(Frozen, Hidden)>();
commands.entity(entity).remove::<Hidden>();
}
// Unfreeze pellet blinking
for entity in blinking_query.iter_mut() {
}
(StartupSequence::CharactersVisible { .. }, StartupSequence::GameActive) => {
// Unfreeze the player & ghosts & pellet blinking
for entity in player_query
.iter_mut()
.chain(ghost_query.iter_mut())
.chain(blinking_query.iter_mut())
{
commands.entity(entity).remove::<Frozen>();
}
}