切换场景前音乐停止播放

This commit is contained in:
chicrobot committed 2026-08-05 01:37:46 +08:00
1 parent d7c16c80cd
commit 87d5696ddb
1 file changed
+1
+1
View File
@@ -34,6 +34,7 @@ class GameScene(BaseScene):
def update(self, dt=0): def update(self, dt=0):
if self.back_status: if self.back_status:
pygame.mixer_music.stop()
self.switch_to_scene("MainMenuScene") self.switch_to_scene("MainMenuScene")
if self.Left_status and self.dirty_x >= 0: if self.Left_status and self.dirty_x >= 0:
self.dirty_x -= 1 self.dirty_x -= 1