mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-08 18:08:05 -06:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f504d6c77 |
@@ -79,15 +79,19 @@ pub fn startup_stage_system(
|
|||||||
if let Some((from, to)) = startup.tick() {
|
if let Some((from, to)) = startup.tick() {
|
||||||
debug!("StartupSequence transition from {from:?} to {to:?}");
|
debug!("StartupSequence transition from {from:?} to {to:?}");
|
||||||
match (from, to) {
|
match (from, to) {
|
||||||
// (StartupSequence::TextOnly { .. }, StartupSequence::CharactersVisible { .. }) => {}
|
(StartupSequence::TextOnly { .. }, StartupSequence::CharactersVisible { .. }) => {
|
||||||
(StartupSequence::CharactersVisible { .. }, StartupSequence::GameActive) => {
|
// Unhide the player & ghosts
|
||||||
// Unfreeze and unhide the player & ghosts
|
|
||||||
for entity in player_query.iter_mut().chain(ghost_query.iter_mut()) {
|
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
|
(StartupSequence::CharactersVisible { .. }, StartupSequence::GameActive) => {
|
||||||
for entity in blinking_query.iter_mut() {
|
// 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>();
|
commands.entity(entity).remove::<Frozen>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user