Skip to content

fix: resume TimeManager when GameScene exit#824

Merged
liquidhelium merged 2 commits into
TeamFlos:mainfrom
K0nGbawa:fix/822-resume-timemanager-when-gamescene-exit
Jul 15, 2026
Merged

fix: resume TimeManager when GameScene exit#824
liquidhelium merged 2 commits into
TeamFlos:mainfrom
K0nGbawa:fix/822-resume-timemanager-when-gamescene-exit

Conversation

@K0nGbawa

Copy link
Copy Markdown
Contributor

相关Issue

#822

修复方式

当GameScene通过除should_exit外方式退出时恢复TimeManager

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Issue #822 by ensuring TimeManager is resumed when GameScene exits via paths other than should_exit, preventing UI/state issues caused by leaving the timer paused.

Changes:

  • Resume TimeManager when GameScene returns a non-None NextScene via self.next_scene.
  • Reset TimeManager speed and adjust_time on these exits (consistent with other exit paths).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread prpr/src/scene/game.rs Outdated
Comment on lines +1309 to +1311
if !matches!(next_scene, NextScene::None) {
tm.resume();
}
@liquidhelium
liquidhelium merged commit 98fa2b2 into TeamFlos:main Jul 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants